Web based dashboards with WSUS 2012

To begin, credit where credit is due. The following is based off of Scott Babcock's "WSUS Reporting with Powershell" series. You can find his work here as well as listed below as a reference. The HTML table generation is a PowerShell script written by Cookie.Monster. That script can be found here as well as listed below as a reference. I wasn't a huge fan of the HTML generation in Scott's work so I substituted in Cookie.Monsters which allowed for conditional color coding as well as a nicer looking table. I've also added a -group parameter so you can target a specific group or all WSUS groups if not specified.

The script is relatively strait forward, basically for each member of each update group we run the GetSummariesPerComputerTarget method with the update scope of ApprovedStates=LatestRevisionApproved. This tells us our general count of what is installed, failed, installed pending reboot and a few other things for a member. We then run the GetUpdateInstallationInfoPerUpdate() method for all updates of our client\member that have a status of “downloaded” or “notinstalled” (i.e. needed). For each of these needed updates we count what are security and what are critical. Each time this info is gathered it’s added to a custom object for the instance of the client and is then added to an array containing all our client objects. After gathering all this info for every client we run some logic for color coding specific conditions then pass our full client array to Cookie.Monsters sweet HTML functions and vuala an HTML table is born! The table is then pushed to a file named after the update group with no spaces.

I've queued the script up in Task Scheduler and built an additional index.html supporting frames. This allows for a legend at the top sourcing each of my update group html files and when selected targets the frame at the bottom. The example below shows a single update group's HTML file. 

Color Coding Logic

  • Not Installed between 20 and 39 is yellow
  • Not Installed between 40 and 59 is orange
  • Not Installed 60 and above is red
  • Failed install is green
  • Anything pending reboot is blue
  • Last Reported Status Time more than 30 days ago is pink
  • Last Sync Result failed is purple

Mocked up example illustrating the color coding.

index.html and legend.html

Below are the links to download my index and legend html files. The index is simple and leverages two frames to load a legend at the top and a default server group at the bottom. You'll need to edit the index.html to target a default wsus server group report file and then the legend.html to target the appropriate wsus server group report files that the script generates. You'll obviously need to adjust the table in the legend.html file to fit you needs with regards to how many wsus server group report files you have (2 rows 4 columns etc etc).  

index.html
legend.html

Example showing both the index and legend html

Example showing both the index and legend html

Example showing web root with a single auto generated wsus server group report file. Note: the other 7 auto generated wsus server group report files are missing. 

Example showing web root with a single auto generated wsus server group report file. Note: the other 7 auto generated wsus server group report files are missing.