简体   繁体   中英

Sending multiple arguments to a Powershell opened with Start-Process

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM