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.
将$cmds
更改为:
$cmds = {"cd C:\\"; "dir";}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.