If I understand you correct you want to start an AutoIt program from PowerShell and get an return code from your AutoIt program to PowerShell? AutoIt (Test.exe):   ; just return 55 Exit 55   PowerShell: $p = Start-Process D:\Test.exe -wait -NoNewWindow -PassThru $p.HasExited $p.ExitCode $p.ExitCode  contains the return value of Test.exe   (55)