Powershell – Sending multiple arguments to a Powershell opened with Start-Process

powershell

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.

Best Solution

Change $cmds to:

$cmds = {"cd C:\"; "dir";}