So I'm using the command
Start-Process powershell -Verb runas -ArgumentList $cmds
where $cmds is
$cmds = "cd C:\", "dir"
I just want the new powershell that I'm opening to run multiple commands before it automatically closes.
Change $cmds
to:
$cmds = {"cd C:\"; "dir";}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With