Monitoring Windows Updates and Pending Restarts on the servers using PowerShell

The script will monitor all the servere with Windows Updates ready to be installed, Windows Updates configured to be checked manually or servers that required a reboot. Servers that do not fall under these conditions will not be listed.

4.7 Star
22,544 times
Add to favorites
E-mail Twitter Digg Facebook
  • failed due to error: 800706ba
    1 Posts | Last post January 24, 2019
    • Good day,
      This is exactly what I am looking for. I have numerous labs consisting of Windows 7 and Windows 10 PC's that have Windows updates managed by GPO. I need to pull reports from time to time on the status of Windows Updates. The script runs with no issue if I choose the "localhost" to pull a test report, but when I add Domain PC's to the list, I get the following error and no useful data. 
      WARNING: PC-001: Exception calling "CreateInstance" with "1" argument(s): "Retrieving the COM class factory for remote component with CLSID {4CB43D7F-7EEE-4906-8698-60DA1C38F2FE} from machine PC-001 failed due to the following error: 800706ba PC-001."
      I am Running the Powershell ISE as Admin and the Firewall is turned off on all test domain clients, so the Firewall does not seem to be the issue. 
      Any help is appreciated. 
  • Monitoring WSUS
    1 Posts | Last post November 30, 2018
    • Hello,
      I am a student in a work-study program as a system administrator and I am a beginner on PowerShell.
      I am working on a WSUS Workgroup deployment project (no GPO) with the help of WSUSClientManager.
      I need to query the remote registry to see if new updates are available and then send it by email to the client in HTML format.
      I was inspired by a Technet script and modified it to suit my needs.
      It works, but when I run it on the WSUS server, either I have a network path problem or access denied.
      First of all, is it feasible?
      Is it a problem of credentials?
      I configured WinRM and authorized the WSUS server as a trusted host. 
      I don't know where to go from here.
      Thank you for your help.
  • Script hangs, restart windows update service required
    1 Posts | Last post June 26, 2018
    • Dear Mr. Pereira,
      The script is great but on some servers it hangs. As soon as I restart the Windows Update service on the affected server, the script continues to run. 
      Is it possible to install a timeout per server?
      I think the script hangs sometimes here:
      else { $UpdateSession = [activator]::CreateInstance([type]::GetTypeFromProgID("Microsoft.Update.Session",$Computer))
      Sorry for my Google translated english  ;)
  • we need log file of this script process
    1 Posts | Last post May 09, 2018
    • Hi Sir,
      We have getting resolve but few listed system was missing form results page. i am trying to add log file on this script but i can't. please help on this issue
  • Order of columns
    5 Posts | Last post February 05, 2018
    • Thanks for the great script.  Can you tell me how I can go about changing the order of the columns in the report?
    • ok, have just worked this out.  You need to change the formatting part to something like this (I've changed the column headings so please adjust to suit):
      # Formatting result
      $tableFragment = $results | select Computer,UpdatesToInstall,Total,Critical,Important,RebootPending,WindowsUpdateStatus | ConvertTo-HTML -fragment
    • Tnx
    • Be aware that this format should be as such unless the variables in the script are changed to match the formatting
      $tableFragment = $results | select Computer,WindowsUpdateStatus,TotalOfImportantUpdates,TotalOfUpdates,UpdatesToInstall,RebootPending,TotalOfCriticalUpdates | ConvertTo-HTML -fragment
    • Replace instances of New-Object PSObject -Property @{ with this [pscustomobject]@{
      That should make it an ordered custom object :)
  • Columns don't align with Headers
    2 Posts | Last post February 05, 2018
    • Can someone help me figure out how to make the data in the table columns align with the headers please?  The headers look to be center aligned but the columns are aligned left.
      I tried changing this "thead th{font-size:120%;text-align:left;}"
      to this "thead th{font-size:120%;text-align:center;}"
      but that didn't help.
    • I basically removed those with thead {} and theah th {} and used TH and TD instead
      th {border-bottom:2px solid rgb(79,129,189);border-top:2px solid rgb(79,129,189);padding-bottom:10px;padding-top:10px;font-size:120%;text-align:left}
      td {text-align:left}
      Now mine aligns nicely
  • exception calling openremotebasekey with 2 arguments the network path was not found
    1 Posts | Last post March 20, 2017
    • Hello! I run the script, and I get the above message.
      in windows 2008R2 
      what to do?
  • Windows Server 2008 R2 updates
    1 Posts | Last post October 19, 2016
    • Hi,
      Great script, thank you. The script runs fine except when I update Windows 2008 R2 Servers. Once I've updated those servers, the script doesn't give me any results to say no updates are available. Once there are updates available again for 2008, they pop up in the script results again and show me how many updates are available. I've no problems with server 2012 though, if the server is up to date, then I'm told that no updates are available. So basically, when Server 2008 is up to date, it doesnt show me any results. 
  • Running Locally
    2 Posts | Last post August 23, 2016
    • What if I wanted to run this locally as a scheduled job on a server?
    • Hi EliMcC,
      You can. You just need to create a windows task and in the actions set
      - Actions: Start a Program
      - Program/Script: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
      - Add Arguments:  -executionpolicy bypass -file <path to script>\<powershell script>.ps1
      and of course set the trigger schedule
  • Single Server
    1 Posts | Last post June 08, 2016
    • As I need to implement this in a Citrix Provisioning Service environment I do not need to feed it a group of servers nor do I need to send an email.  I just need a pop up window to tell me there are pending reboots before I shut down the server for replication.  What is happening is that the system appears to have completed all patches yet after I seal up my golden image and reboot a target from this image it shows pending updates being applied. :( so the reboots take longer then normal.
1 - 10 of 21 Items