~/2007/08/24/check-for-reboot.md

Check for reboot

---
author: 
date: 
updated: 
read: 1 min
in:   [scripts]
tags: [script]
---
text
call checkpendingstatus
sub CheckPendingStatus
Set ComputerStatus = CreateObject("Microsoft.Update.SystemInfo")
If ComputerStatus.RebootRequired Then
wscript.echo "This computer has a pending reboot."
Else
wscript.echo "this computer does not have a pending reboot."
End If
End sub