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.6 Star
(329)
648,841 times
Add to favorites
Windows Update
4/4/2017
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question


  • How do I install the PSWindowsUpdate module remotely with Powershell
    2 Posts | Last post February 18, 2018
    • I'm new to powershell so this may be an easy solution, but everything I've tried so far with powershell code has failed with access denied error.  What I want to do is copy the PSWindowsUpdate module to a remote system and import it from a pssession to the host. Any help would be much appreciated
      
      TNX
      
      Marty
    • Access denied errors when running locally are because these probably have to run As Administrator.
      
      Access denied errors when running remote commands are usually because of lack of trust with credentials. Most of the time its a problem where the remote computer trusts yours (so you can Enter-PsSession, etc), but your computer does not trust the remote and doesnt pass along the credentials to use for running things properly as you. It also tends to be as consistent as powershell syntax. 
      
      Search around the internet for "winrm qc", Enable-WsMan, CredSSP, and "Kerberos Double Hop" for more info.
  • Quick install instruction
    1 Posts | Last post February 11, 2018
    • (new-object Net.WebClient).DownloadString("http://psget.net/GetPsGet.ps1") | iex
      install-module -ModuleUrl https://gallery.technet.microsoft.com/scriptcenter/2d191bcd-3308-4edd-9de2-88dff796b0bc/file/41459/47/PSWindowsUpdate.zip
  • Failed on printers
    1 Posts | Last post February 05, 2018
    • I am getting an error on printers when using:
      Install-WindowsUpdate -Install -AcceptAll -MicrosoftUpdate 
      
      Failed                  5MB Dell - Printer - 4/20/2014 12:00:00 AM - 1.0.2.6                                                                                    
      Failed                 29KB Microsoft - Printer - 6/21/2006 12:00:00 AM - 10.0.15063.0                                                                               
      Failed                 30KB Microsoft - Printer - 6/21/2006 12:00:00 AM - 10.0.15063.0                                                                                                                                       
      I am getting this on all the computers where i use pswindows update, with errors always on printerdrivers.
      Is there an solution so it is not failing on printer drivers?
      
      thanks :)
      
  • Pulling updates from internal WSUS server "?
    1 Posts | Last post February 05, 2018
    • how do get this to pull the updates from our SCCM WUSU server so that I can only get the updates that we approve ?
  • Win 2016 Add-WUServiceManager Fails
    1 Posts | Last post February 01, 2018
    • Windows Server 2016 the Add-WUServiceManager Fails
      
      I am running PS as administrator.
      
      PS C:\administrator\windows_updates> Add-WUServiceManager -ServiceID 7971f918-a847-4430-9279-4a52d1efe18d
      
      Confirm
      Are you sure you want to perform this action?
      Performing the operation "Register Windows Update Service Manager: 7971f918-a847-4430-9279-4a52d1efe18d" on target
      "MCSDBRAC3A".
      [Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"): Y
      Add-WUServiceManager : Exception from HRESULT: 0x8024500C
      At line:1 char:1
      + Add-WUServiceManager -ServiceID 7971f918-a847-4430-9279-4a52d1efe18d
      + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
          + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Add-WUServiceManager
      
      Any ideas? 
      
      Thanks,
      Marcelo
  • Doesn't quite work
    1 Posts | Last post January 12, 2018
    • PS C:\Users\Administrator> Get-WUInstall -Type "Software" -KBArticleID $KBList -AcceptAll
      Get-WindowsUpdate : A parameter cannot be found that matches parameter name 'Type'.
      At line:1 char:15
      + Get-WUInstall -Type "Software" -KBArticleID $KBList -AcceptAll
      +               ~~~~~
          + CategoryInfo          : InvalidArgument: (:) [Get-WindowsUpdate], ParameterBindingException
          + FullyQualifiedErrorId : NamedParameterNotFound,PSWindowsUpdate.GetWindowsUpdate
      
      If I change Type to UpdateType, then it partially works; only 3 out of 173 updates I passed in worked. 
  • Windows 10 Upgrades
    4 Posts | Last post January 04, 2018
    • Hello,
      
      I have been using this script with my WSUS deployment and it's been working great. However, when it comes to Feature Updates such as moving to 1607 and now 1703, the update is accepted, downloaded, and installed as expected but after reboot the system goes straight to the lock screen and makes no mention of installing updates. So in the end, the update is not applied. Has anyone else experienced this?
    • How are you using it in your WSUS setup?
    • The Script can handle normal updates, but the windows 10 feature updates are different. when they install they are only staging the installation media on the system drive. You then need to trigger the upgrade install to finish the upgrade process. The command I use in my scripting is C:\$WINDOWS.~BT\Sources\SetupHost.Exe /Finalize /Update /InstallFile "C:\$WINDOWS.~BT\Sources\Install.esd"
      Hope this helps
    • droorda,
      
      Can you elaborate on how you are using that snippet in your script to finalize the feature updates?  This is THE last piece I cannot figure out.  I have tried running the bit you posted, but it doesn't seem to do anything or kick off anything.  I have everything else working to get 1500 machines updated.
      
      Thanks,
      Seventoad
  • PSWindowsUpdate v.2.0.0.0 via NeGet --- Doesn't Work
    4 Posts | Last post December 27, 2017
    • Okay I have narrowed this down a bit.
      
      I have noticed on recent installations of PSWindowsUpdate, via NeGet, updates are listed, but not downloaded or installed.
      
      I have gone back to prior installs and they work just fine, - All versions of Windows 10, and even Windows Server 2016.
      
      I checked the installed version of PSWindowsUpdate, and noticed on systems where it didn't work, it was v.2.0.0.0 and on versions where it is working, I have v.1.5.2.6.
      
      Any ideas where to go from here?
    • This page does not concern the current version of PSWindowsUpdate. All future development is located at - https://www.powershellgallery.com/packages/PSWindowsUpdate - Which brings you to the most current version. 2.0.0.0 is a compiled version of PSWindows Update. At this time, your scripts will not work with this version. The prior version 1.6.1.1, does work. "Install-Module -Name PSWindowsUpdate -RequiredVersion 1.6.1.1"
    • Hi dm1996,
      I had the same issue with some computers but not all. After a quick search I found that it was the PowerShell version installed. PSWindowsUpdate v.2.0.0.0 needs PowerShell 3 at least. I updated PowerShell version on the computers where I had the trouble and now it's working.
      
      Hope it will help you.
    • Confirmed same issue. But exists on Windows Server 2016 PowerShell 5.
      
      SVersion                      5.1.14393.1944                                                                                                                                        
      PSEdition                      Desktop                                                                                                                                               
      PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                                                                                                               
      BuildVersion                   10.0.14393.1944                                                                                                                                       
      CLRVersion                     4.0.30319.42000                                                                                                                                       
      WSManStackVersion              3.0                                                                                                                                                   
      PSRemotingProtocolVersion      2.3                                                                                                                                                   
      SerializationVersion           1.1.0.1 
      
      I downgraded to PSWindowsUPdate 1.6.1.1 . It applied updates with progress bar, but hung at $RebootRequired . I had to manually reboot it. Now I see pending Windows Updates in the GUI, but the Get-WUInstall command doesnt seem to see them and takes no action. 
  • Running on 2016
    4 Posts | Last post November 27, 2017
    • Will this run fine on Server 2016?
    • I have it working on 2016, recent past... But currently troubleshooting new problem that rose recently, where the updates are seen but not downloaded or applied.
    • I install the module using 'install-module pswindowsupdate' which downloads from psgallery. I use it on various Windows versions, both for build and ongoing maintenance. However, I have been experiencing the same issue for the last two versions of the module. It will list the updates but not complete the process of download and install. Any input is greatly appreciated to keep this great work going! 
    • See the answer to the question posted above.
  • Filter out firmware update
    1 Posts | Last post November 24, 2017
    • I want to use your module to regularly update drivers on my machines. However, I want to exclude firmware (BIOS/UEFI) updates because they are likely to has for the BIOS password or fail.
      
      So I'd do it this way:
      $WUlist=Get-WUList -UpdateType Driver -WindowsUpdate 
      $drvList=$drvList=$WUlist | ? DriverClass -ne "Firmware"
      
      However, where do I go from there? With other updates they'd normally have an UpdateID or a KB, but drivers lack those attributes...
11 - 20 of 306 Items