How can I run an executable in PowerShell and through an if statement determine whether it succeeded or failed?
More specifically I\'m trying to get devenv.exe to bu
.\YOUREXE.exe if($LASTEXITCODE -eq 0) { Write-Host "The last PS command executed successfully" } else { Write-Host "The last PS command failed" }