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
407,119 times
Add to favorites
Windows Update
E-mail Twitter Digg Facebook
Sign in to ask a question

  • 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 
  • Windows Update module not working for Windows 2012 STD
    1 Posts | Last post September 02, 2016
    • Hi,
      I have automated the windows image creation using the answer file which also connects to local WSUS server and download and install the updates from it during the logon phase. I am using the PSWindowsUpdate module and have forcefully pointed the server to local wsus server before calling the Get-WUInstall cmdlet. However for Windows 2012 STD it just import the module and does not do anything after it. The same works fine with Windows 2012 R2. Is there any additional changes to be done for Windows 2012 STD.
  • Error 0x800F902 when using get-wuinstall
    1 Posts | Last post September 01, 2016
    • Hi,
      When I download and update a bunch of updates with the following command, I always get at least 2-3 updates failed withe error 0x800F902. If I try to download and update them individually using KB parameter, they run OK. Did someone come across the same issue? Here is the command I am trying to use. By the way I am using task scheduler to run the Powershell script. 
      get-wuinstall -MicrosoftUpdate -Acceptall -Ignorereboot
      Your advise will be really helpful.
  • Typo in code
    1 Posts | Last post August 22, 2016
    • When running the command "Get-WUHistory" there is a typo in the word "history" that displays at the top on the green background:
      "Get update histry for ..."
      It should say:
      "Get update history for ..."
  • PSWindowsUpdate and DSC
    1 Posts | Last post August 18, 2016
    • I am trying to get the PSWindowsUpdate Module to work inside a DSC Configuration where Im looking to call Get-WUInstall to install windows updates on a freshly deployed VM.
      Im using the Script Resource but i cant seem to get the script to pull the correct True value in the Test Script. Below is the Test Function in the Script Configuration
                      TestScript = {
      		$GetUpdates = Get-WUList
      		if ($GetUpdates -ne $null) 
      		return $true } 
      		return $false }
      So if WU-List provides updates the script should return true and run the SetScript - issue is when i run the above in PowerShell it works as expected, if i run in Start-DSCConfiguration it returns false and the SETScript is never run.
      Has anyone tried to get PSWindowsUpdates to work in a DSC configuration?
      Thanks again for this great script!
11 - 20 of 234 Items