How to do this in Powershell v2.0 ?
Start-Process cmd.exe -Credential $MyCred -WindowStyle Hidden;
i.e. start a process while giving user credentials and hiding the window.
When i execute each one separately it just works fine.
You may try something like this:
$cred=Get-Credential Start-Process cmd.exe -Credential $cred -WindowStyle Hidden