Topics: Archive - General
Jul 3, 2014 at 8:26 AM
Hi ,

i am trying to detect if there's any system restart pending then prompt the restart windows by Show-InstallationRestartPrompt.

when the restart prompt shows up , i'd want the rest of the script stop running. just like how Show-InstallationRestartPrompt -wait

any idea how i can do that?
Jul 5, 2014 at 9:18 PM

We always pass control back to SCCM when showing the restart prompt as otherwise SCCM would see error codes for successful installations. We could add that parameter to wait for the user to click restart, then pass the exit code back to SCCM, then restart the machine, but you could still have users who opt for Start -> Restart. Then you have a failed installation error code, so it's always going to be best practice to pass control back to SCCM and show the restart prompt asynchronously.

Hope that makes sense.