Reply To: Issue with passthrough parameter in SCCM

///Reply To: Issue with passthrough parameter in SCCM
Reply To: Issue with passthrough parameter in SCCM 2017-02-01T23:08:25+00:00

The Toolkit Forums General Issue with passthrough parameter in SCCM Reply To: Issue with passthrough parameter in SCCM

Matt
Participant
Post count: 11

Dan,

I use the following which works for me and is not as long or complicated as above:
“Deploy-Application.exe” -deploymode silent -AllowRebootPassThru

The code in-line that does passthru to SCCM is as follows:
$RC = Execute-Process -Path “blahblah” -Parameters “blahblah” -WindowStyle ‘Hidden’ -IgnoreExitCodes “3” -PassThru
if ($RC.ExitCode -eq “3”) {
Exit-Script -ExitCode 3010
}

You use ignoreexistcode here so that 3 doesn’t trigger AppDeploy to report a failure but you also use the passthru to send it forward. At some point, you still have to tell the script to exit and return that code so in my case, I chose to convert it in-line to a 3010 rather than add it to the app object in SCCM.