WSUS Server HTML Report

While presenting at the Philly PowerShell User Group on Thursday, one of the things that I showed in my examples was an HTML report that I wrote for WSUS. This report basically does a report on various components of a WSUS server to include its version as well as the upstream server that it is using to synchronize with.

User Required Information

The following areas require some user interaction in order to properly run the script. Some may not be required, but should still be reviewed prior to running the script.

#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

By default, the script will create an HTML file and open the report once it has completed.

What Does This Report On?

A list of the currently active report sections are below:

  • WSUS Server
    • WSUS Information
    • WSUS Server Content Drive
    • Last Server Synchronization
    • Upstream Server Information
    • Automatic Approvals
    • Child Servers
    • WSUS Database
  • WSUS Client Information
    • Computer Statistics
    • Grouped By Operating System
    • Stale Computers
    • Computers Not Assigned to a Target Group
    • Failed Update Installations By Computer
    • Computers with a Pending Reboot
  • WSUS Update Information
    • Update Statistics
    • Failed Update Installations by Update
  • Target Group Information
    • Target Group Statistics
    • Empty Target Groups

I have plans for more things to report on, but wanted to get the initial script out for public consumption and to see areas where I can improve on this and add more things based on comments.

Here is a small example of the output:


Until then, head over to the link below to download the script and let me know what you think!

This entry was posted in powershell, WSUS and tagged , , , . Bookmark the permalink.

4 Responses to WSUS Server HTML Report

  1. Cool script, thank you for posting it. I know this is an older post but if you’re still checking it, have you done published any updates? We have multiple sites and each has its own SUS Server. I’d like to loop through them from an array (something I will be able to add easily enough) and it would be nice to have the output in something other than HTML. Since I’ll be gathering data from 20+ servers, having a CSV output that I can parse into something pretty for the execs would be nicer to view than an individual report for each server.

  2. Silverhawk says:

    Great Script, Thank’s.
    My architecture got an upstream and two downstream server. The power shell command to get data seams working only on the downstream servers. The informations synchronized to the upstream aren’t on the report if i run it on the upstream server. I cheked the WSUS console on my upstream server, data of the synchronized downstrem server and datas are present.
    Is there something to do to get powershell reporting running on upstream servers ?
    thank’s a a lot.

  3. Graeme says:

    Great Script Boe! We’re making a few changes for our environment (and using some code in an Audit script we have). Question though, in your Set-AlternatingCSSClass section, is it possible to loop through the portion of the HTML to check if it says “Fail” to set the background color via a CSSFailClass to red?

    Thanks for all the scripts, you’ve really helped some of our WSUS stuff.

  4. Babcockscott says:

    I’ve done something similar and am also including the KB article as part of the html report. Check out my second of a three part series where the report is compiled.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s