Retrieving MSIEXEC exit code in PowerShell Retrieving MSIEXEC exit code in PowerShell powershell powershell

Retrieving MSIEXEC exit code in PowerShell


Try this:

(Start-Process -FilePath msiexec.exe -ArgumentList $parms -Wait -Passthru).ExitCode