Windows Update PowerShell Module

This function is a piece of PSWindowsUpdate module to manage Windows Update on a computer system running Windows. Whole module contain set of functions to check, download and install updates from PowerShell.

4.7 Star
430,571 times
Add to favorites
Windows Update
E-mail Twitter Digg Facebook
Sign in to ask a question

  • Windows Server 2016 Default AU Service Manager
    1 Posts | Last post December 30, 2016
    • Hi,
      I have a problem in my WSUS deployment in regard to Windows Server 2016. Windows Server 2016 cannot connect to WSUS server unless it has Internet connectivity of some sort. But as soon as I prevent access to the Internet, connection to the WSUS server would fail.
      After some research I found that starting from Windows Server 2016 the default AU Service is Windows Update.
      $MUSM = New-Object -ComObject "Microsoft.Update.ServiceManager"
      If you do the same thing on Windows Server 2012 R2 and downward, you will notice that “Windows Server Update Service” is the default AU Service.
      It seems that if I could change the default AU Service to “Windows Server Update Service” (WSUS) the problem would be solved.
      Are you aware of any technique or method to achieve that?
  • Windows 10 Anniversary Update (1607)
    3 Posts | Last post December 28, 2016
    • I am trying to build audit images of Windows 10 Anniversary Update (1607) with the latest Windows Updates installed using this tool (downloaded inside of PowerShell directly).  I can install all the updates for Windows, Office, dotNet, etc.  All except for 2.
      One is "Update for Windows 10 Version 1607 (KB3199209)" and the other is "Cumulative Update for Windows 10 version 1607 (KB3194798)".  They just will not download.  I have tried it against MS Windows Update (internet) as well as my internal WSUS server.  I have tried it against my Full Download WSUS server as well as my newer Express Download WSUS server.  It just will not download those 2 updates.
      I thought perhaps it was because Audit Mode wouldn't allow me to install those 2 updates, so I sysprep'ed the PC (OOBE) and tried it there.  Same thing.  Will not download those 2 updates.  Windows Update (GUI) downloads them fine and installs without incident.
    • Facing the same thing with Update for Windows 10 Version 1607 for x64-based Systems(KB3199986) and Cumulative Update for Windows 10 Version 1607 for x64-based Systems(KB3197356)
      Not using audit mode, just regular Get-WUInstall -AcceptAll
      It gets stuck on downloading either with little to network activity or proof of progress after waiting for 4 hours. 
      This is downloading from a WSUS server in the same network.
      Other updates download quickly.
      Strangely, the downloading (phase 3) progress indicator says KB3199986 is 946MB whilst the "Accepted" (phase 2) said it is only 11MB, and the one it finds after it, which is KB3206632, is 946MB ? 
      Checking the internet it seems that 11MB is the correct size for the KB3199986 (
      is PSWindowsUpdate somehow mixing up the catalog information? I tried to examine the WindowsUpdates.log using Get-WindowsUpdatelog but the output was useless (dateless spamming about missing information see some example below)
      1601-01-01 01:00:00.0000000 2096  2304                  Unknown( 13): GUID=aa07f95d-91be-3f47-51b3-717e4c7ddc98 (No Format Information found).
      1601-01-01 01:00:00.0000000 2096  2304                  Unknown( 14): GUID=aa07f95d-91be-3f47-51b3-717e4c7ddc98 (No Format Information found).
      1601-01-01 01:00:00.0000000 2096  5332                  Unknown( 34): GUID=7b9bf239-47b9-3688-3a9e-14f09f262608 (No Format Information found).
      1601-01-01 01:00:00.0000000 2096  5332                  Unknown( 37): GUID=16b00d31-8e89-3c95-8c8e-5dbc3ff7a198 (No Format Information found).
      1601-01-01 01:00:00.0000000 2096  5332                  Unknown( 196): GUID=d1c97d0d-9e32-3972-1423-e056c370718e (No Format Information found).
      1601-01-01 01:00:00.0000000 2096  5332                  Unknown( 197): GUID=d1c97d0d-9e32-3972-1423-e056c370718e (No Format Information found).
      Did you ever get this resolved?
    • Turns out it isn't a problem of PSWindowsUpdate, The 1607 build of Windows 10 (Anniversary Update) contains bugs that break WSUS functionality for certain updates, namely the "Update for Windows 10 Version 1607" and "Cumulative Update for Windows 10 version 1607" refuse to be downloaded via WSUS.
      It helps to install the latest "Update for Windows 10" and "Cumulative update for Windows 10" by using wusa.exe before attempting to update from WSUS.
      At this moment I could fix it by installing KB3199986, KB3197356 and KB3206632 which seem to be the latest ones at the time of writing, however I believe as newer cumulative updates are released and the ones I just mention become superseeded, you might need to manually download the ones that replace them instead and installing them with wusa again.
  • Exclude Certain SharePoint Updates
    1 Posts | Last post November 18, 2016
    • Hi Michal,
      We have almost all server having MS SharePoint installed and we want to exclude any automated updates coming through Windows Update module.
      We want to install windows update excluding any SharePoint updates.
  • windows 2016 support?
    1 Posts | Last post October 21, 2016
    • Does this tool support windows 2016 at all?
      I can run it against one of our 2016 EVAL edition servers and it creates the scheduled task but the updates never seem to install or reboot the server. If I check the update status screen it just shows I have 2 updates available from our WSUS server and ready to download
      Same tool with same arguments in the $script portion work perfectly on 2012 R2 servers.
      i'm running the below 2 commands from my workstation, which work for 2012 r2 but not this 2016 EVAL box, in the pswindowsupdate.log file in C drive
      it seems that it runs on a non eval 2016 box... can anyone confirm if they have a 2016 eval server running if they have the same issue?
  • Filter by Releasedate
    2 Posts | Last post October 21, 2016
    • Is there a way to filter the updates by release date? 
      For example I want to update a server to the same patch level as an existing server. I know the existing server was last updated on the 28/02/16 and the new server needs to be at the same patch level. 
      So I would want to run this script and it by only show updates released before 28/02/16 
      Is there anyway to achieve that here? 
    • Rob,
      Check this out.
      Get-WuList -WindowsUpdate -MicrosoftUpdate | ? {$_.LastDeploymentChangeTime -lt $patchUpToDate }
  • Get-WUList -MicrosoftUpdate doesn't show all updates
    1 Posts | Last post October 03, 2016
    • Hello,
      I'm a bit disappointed while this tool is the only one that can manage windows update but when I run Get-WUList -MicrosoftUpdate I'm not getting all updates as I see in the GUI.
      Sadly, the update i can't see is the update that I want to hide. I can't hide the update that i don't see in Get-WUList -MicrosoftUpdate.
      The specific update is KB3167679 and is an important one.
      Notice that Get-WUList -MicrosoftUpdate display also optional updates.
      Thank you.
  • output if the update is important or optional
    1 Posts | Last post September 24, 2016
    • Hello,
      I am trying to get the list of Windows Update using the command below.
      Get-WUList -MicrosoftUpdate | Out-GridView
      It runs great but the information that I am getting are ComputerName, Status, KB, Size, Title. Is there a way to get information if the update is Important or Optional?
  • WSUS PS Script Question
    2 Posts | Last post September 13, 2016
    • Hello, I originally posted to the PS technet forum, and was directed to this forum.  Thanks in advance for help with the below question, and sorry for any confusion with posting to the wrong area.   
      Good morning, 
      I am fairly new to Powershell scripting, and this is my first post to this forum. Anyway, I've been trying to find a way to manage WSUS assigned Windows updates. Basically, listing and installing assigned updates from one PS session while on my Windows 7 vm would be ideal, avoiding logging into domain controllers, veeam backup servers, etc, several times for patching. 
      So far I've been working on this:
      1) Invoke-Command  {ipmo \\file-server\share\scripts\WSUS\PSWindowsUpdate}   This is used to import Windows Update modules that I found here: 
      Invoke-Command -Session $s {Get-WUlist}      This works without incident when run remotely on a Win 2008 R2 server, providing a listing of updates. 
      2) Invoke-Command  {Get-WUInstall -AcceptAll -verbose -Confirm:$TRUE}
      WARNING: Support local instance only, Continue...
      VERBOSE: Connecting to Windows Server Update Service server. Please wait...
      VERBOSE: Found [1] Updates in pre search criteria
      VERBOSE: Found [1] Updates in post search criteria
      When running this module the script will hang and not install the one assigned update applied by WSUS to this particular server.
      Any help or direction is appreciated.
    • So I can run updates with further modification of the script, but the remote install will die with the below error.  
      I am running this with domain admin creds, and everything is updated to PS5 with PSWindowsUpdate modules imported (locally to the target as well).  
      Running the other modules works fine - i.e. WUList, and so on.  
      Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
          + CategoryInfo          : OperationStopped: (:) [], UnauthorizedAccessException
          + FullyQualifiedErrorId : System.UnauthorizedAccessException
          + PSComputerName        : targetserver
      The property 'Updates' cannot be found on this object. Verify that the property exists and can be set.
          + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
          + FullyQualifiedErrorId : PropertyNotFound
          + PSComputerName        : targertserver
  • failed updates
    3 Posts | Last post September 12, 2016
    • i'm having some trouble using this to install a couple of the march 2013 updates. specifically KB2775511 and KB2670838 on windows server 2008. while most updates install fine using
      get-wuinstall -type software -acceptall -autoreboot -verbose
      these fail repeatedly, on multiple servers, with the error code 0x800f0902.
      if i install the updates manually with the windows update gui, they install fine.
    • Hi John,
      Module uses the same mechanisms as the gui version, so it doesn't matter here. It hard to say why, try check Windows Update log. 
    • Hi John,
      I am having the same issue with different set of updates and I believe the GUI works differently than the module does. I say that because, I find the CBS.log to be different when using GUI vs Module. I am just curios to know if you had a chance to resolve the problem? if yes, could you please share the same?
  • How can I get updates from intranet WSUS server?
    2 Posts | Last post September 02, 2016
    • Hi guys,
      I've setup a intranet WSUS server with a URL:“http://my-wsus-server:80”.
      And how can I leverage this module to get updates from my WSUS server?
      Have you guys ever met the same situation as me?
    • You can write a script to change the registry to point to your WSUS server and also change the UseWUserver value to 1. once done call the get-WUinstall cmdlet with the required parameters 
11 - 20 of 238 Items