FAQ Database Discussion Community


Ensure Start-Process starts and finishes in order

powershell,sequence,start-process
PowerShell script has the following Start-Process "D:\Script\EMAIL_Snapshot_Done.bat" $date, $scr_comp Start-Process "D:\Script\BATCH_gup.bat" How to ensure that first Start-Process starts and finishes BEFORE second Start-Process begins?...

Powershell Start-Process : This command cannot be executed due to the error: Access is denied

powershell,access-denied,start-process
I'm trying to run start-process from a powershell script with given credential. Nevertheless the command fail with the following error: Start-Process : This command cannot be executed due to the error: Access is denied Here is the full error log: 18-Jun-2015 11:48:54 Start-Process : This command cannot be executed due...

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment

powershell,credentials,start-process
I'm running into a strange behavior with a powershell Start-Process call. Here is the call: $process = start-process ` "C:\somepath\MyBinary.exe" ` -PassThru ` -Credential $defaultCredential ` -Wait ` -WorkingDirectory "C:\somepath" ` -LoadUserProfile if ($process.ExitCode -ne 0) { #do something } This call always return with the exit code -1073741502. After...