WSUS HTML Report

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. Mult

WSUSReport.ps1
 
 
 
 
 
4.8 Star
(9)
12,158 times
Add to favorites
Windows Update
5/5/2014
E-mail Twitter del.icio.us Digg Facebook
  • Script to .CSV
    1 Posts | Last post October 10, 2019
    • Can anyone provide a way to output this script to a csv file?
  • WARNING: Fqdn<80>: Exception calling "GetUpdateServer" with "3" argument(s): "The request failed with HTTP status 404: Not Found."
    1 Posts | Last post February 21, 2019
    • I am getting the below error:
      WARNING: Fqdn<80>: Exception calling "GetUpdateServer" with "3" argument(s): "The request failed with HTTP status 404: Not Found."
      
      I am running the script in an elevated power shell session on the same WSUS server.
      
      How to solve this?
  • Can this script be used on windows 2016 servers
    1 Posts | Last post February 09, 2018
    • I keep getting a 0 for installed patches?
       
  • The variable '$ConvertSize' cannot be retrieved because it has not been set
    1 Posts | Last post January 31, 2018
    • Hi,
      
      I am facing below error while executing script from powershell however it is working from powershell ISE
      
      The variable '$ConvertSize' cannot be retrieved because it has not been set.
      At D:\Untitled1.ps1:108 char:18
      +         If (-Not $ConvertSize) {
      +                  ~~~~~~~~~~~~
          + CategoryInfo          : InvalidOperation: (ConvertSize:String) [], RuntimeException
          + FullyQualifiedErrorId : VariableIsUndefined
  • Report From WSUS Computer Group
    1 Posts | Last post January 18, 2018
    • Is there a way we can just get a report from a specific Computer Group in WSUS?
  • Line 300 divide by zero ?
    1 Posts | Last post January 04, 2018
    • I am running this on Server 2016 and receiving the following...
      
      PS C:\Windows\system32> C:\Folder\WSUSReport.ps1
      Attempted to divide by zero.
      At C:\Folder\WSUSReport.ps1:300 char:5
      +     $PercentFree = "{0:P}" -f ($Data.Freespace / $Data.Size)
      +     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          + CategoryInfo          : NotSpecified: (:) [], RuntimeException
          + FullyQualifiedErrorId : RuntimeException
  • Add on report "ready to install update" or "Update needed"
    1 Posts | Last post December 14, 2017
    • Hi, many thanks for your script is very magic and we want congratulate to you for you great work.
      
      I have a little request, is possible to add on report the needed update not installed for each machines.
      
      it's are similar to the already existing 
      Failed Update Installations By Update
      or
      Failed Update Installations By Computer
      
      
      Many thanks for your time.
  • ErrorInScript2
    3 Posts | Last post July 21, 2017
    • ErrorInScript
      WARNING: Fqdn<8530>:Exception calling "GetUpdateServer" with "3" argument(s): "Request for principal permission failed.
      
      and its not email?
      
      i am using server 2012r2 for wsus server, waiting for help !!
    • It sounds like there might be a permissions issue with the account that you are using to run the script.
    • ensure when testing the script you're running it from an admin powershell window
  • How to send to multiple email recipients?
    3 Posts | Last post July 21, 2017
    • Hi, thanks for making this script! Works fine on Server 2016 with WSUS, but I just can't get it to send the email to multiple recipients. It does successfully send if I just put one email address in.
      
      I've tried 'user1@domain.com, user2@domain.com' as well as replacing the comma with a semi colon ";" and using different spacing. Can't seem to get it worked out. Is it possible with this script? What's the correct syntax if so?
      
      Thanks!!
    • Open the powershell script and Set the below line to $TRUE
      
      #Send email of report
      [bool]$SendEmail = $FALSE
    • I completely rewrote the email portion as I also could not get CC or additional recipients to work. This is what I wrote:
      
      $smtp=new-object System.Net.Mail.SmtpClient
      $mailMessage = new-object System.Net.Mail.MailMessage
      $smtp.host ="smtp.yourcompany.com" 
      $sender = new-object System.Net.Mail.MailAddress('WSUSReport@yourcompany.com, "WSUS Automated Report")
      $recipient = new-object System.Net.Mail.MailAddress("you@yourcompany.com")
      $mailMessage.IsBodyHTML = $true
      $mailMessage.Subject="WSUS Report"
      $mailMessage.Body = $Report
      $mailMessage.Sender = 'WSUSReport@yourcompany.com
      $mailMessage.From = $sender
      $mailMessage.To.add($recipient)
      $mailMessage.To.add('person1@yourcompany.com')
      $mailMessage.To.add('person2@yourcompany.com')
      $smtp.send($mailMessage)
  • error in script
    4 Posts | Last post June 19, 2017
    • The term 'Get-CIMInstance' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
       the spelling of the name, or if a path was included, verify that the path is correct and try again.
      At WSUSReport.ps1:298 char:28
      +     $Data = Get-CIMInstance <<<<  -ComputerName $WSUSServer -ClassName Win32_LogicalDisk -Filter "DeviceID='$drive'"
          + CategoryInfo          : ObjectNotFound: (Get-CIMInstance:String) [], CommandNotFoundException
          + FullyQualifiedErrorId : CommandNotFoundException
      
    • This was built to run using at least PowerShell V3. If you want to run this in PowerShell V2, you will need to rename Get-CIMInstance to Get-WMIObject and then do a Find and Replace on '[pscustomobject]' and 'New Object PSObject -Property '.
    • Thanks it worked.
    • It should be 'New-Object PSObject -Property ', not 'New Object PSObject -Property '.
1 - 10 of 16 Items