Check for reboot

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

Leave a Reply