This is a script that can be run on-demand or as a scheduled job to scan a WSUS server and generate a HTML report. The script can send an email with the report as the body or save to a file and then open it up for viewing. This is used on a single WSUS server to report on. Multiple WSUS servers will require multiple scripts to be configured at this time.

Related Blog Post: http://learn-powershell.net/2014/05/04/wsus-server-html-report/

User required variables are defined below:

 

PowerShell
Edit|Remove
#region User Specified WSUS Information 
$WSUSServer = 'DC1' 
 
#Accepted values are "80","443","8350" and "8351" 
$Port = 80  
$UseSSL = $False 
 
#Specify when a computer is considered stale 
$DaysComputerStale = 30  
 
#Send email of report 
[bool]$SendEmail = $FALSE 
#Display HTML file 
[bool]$ShowFile = $TRUE 
#endregion User Specified WSUS Information 
 
#region User Specified Email Information 
$EmailParams = @{ 
    To = 'user@domain.local' 
    From = 'WSUSReport@domain.local'     
    Subject = "$WSUSServer WSUS Report" 
    SMTPServer = 'exchange.domain.local' 
    BodyAsHtml = $True 
} 
#endregion User Specified Email Information