First Time Using - Exit Code/Reboot

Hi. So I’m setting up my first app using PSAppDesployToolKit. Got it mostly working but trying to figure out a few things.

In my script I use Execute-MSI to install the app and then have a few commands to copy over certain files. After that I need the user to reboot. I tried using Show-InstallationRestartPrompt but could not get that to work so I ended up just using Restart-Computer to reboot (which works fine the users know it will reboot after install) BUT I have this deployed as a package in SCCM to deploy once, but when I check in Software Center it thinks the install failed and wants to run it again (I’m guessing because of the Restart-Computer command). How can I return the error code to SCCM to tell it the install succeeded?

Can you remove the “Restart-Computer” from the script and just use the Program in Config Manager to prompt the restart?

1 Like

Thanks. Actually I got it to work with Show-InstallationRestartPrompt using no parameters. For some reason when I put a countdown time it wasn’t working. Everything is working properly now including the exit code.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.