Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## Insert under post-installation in PSADT script
- ## Set temporary registry key for successful install. Will later be removed after successful detection via SCCM.
- Set-RegistryKey -Key 'HKEY_LOCAL_MACHINE\SOFTWARE\BIOSupdated'
- ## Remove temp files.
- Remove-Folder "$BIOStemp\$Model"
- ## Show restart prompt if user logged on. For ThinkCentre, system needs to be shut down, and then system will restart on its own.
- If ($Model -like "*M9*") {
- ## Shut down system in 120 seconds with information.
- Execute-Process 'shutdown.exe' -Parameters '-s -f -t 120 -c "Your PC will restart in two minutes to finalize the update."'
- ## For ThinkPads, if user is logged on, show restart countdown. Else, restart immediately.
- } ElseIf ($usersLoggedOn) {
- Show-InstallationRestartPrompt -CountdownNoHideSeconds 120
- } Else { Restart-Computer }
Add Comment
Please, Sign In to add comment