Question:
So I’m using the command
1 2 |
Start-Process powershell -Verb runas -ArgumentList $cmds |
where $cmds is
1 2 |
$cmds = "cd C:\", "dir" |
I just want the new powershell that I’m opening to run multiple commands before it automatically closes.
Answer:
Change $cmds
to:
$cmds = {"cd C:\"; "dir";}