This script checks for computers in a "Reboot Pending" state.

The email report generated by the script uses conditional formatting to highlight which Computers are pending a reboot and for what reason.

The list of Servers to be checked can be pulled from either a  comma separated list, from a txt document or from the computers contained within a specific OU.

 

 

PowerShell
Edit|Remove
<# 
This script checks through a list of computers to report via email whether any computers are in a "Reboot Pending" state. 
#> 
 
#Email Variables 
$smtpServer = "smtp.contoso.com" 
$smtpFrom   = "<Reboot.Pending@contoso.com>" 
$smtpTo     = "<IT.Team@contoso.com>" 
$Subject     = "'Reboot Pending' report" 
....