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


  • PSWindowsUpdate v.2.0.0.0 via NeGet --- Doesn't Work
    2 Posts | Last post November 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"
  • 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...
  • Get List of all installed Updates (KBs) local/remote
    1 Posts | Last post November 20, 2017
    • Hi, I like the CMDLet packet very much.
      I am now just wondering how I can get a simple list of all installed KBs on a local or either remote computer?
      Weird thing is: I did this once by using this script but can't get it working again.
      Result should look like this:
      
      Source          Description     HotFixID  InstalledBy         InstalledOn           
      ------          -----------     --------  -----------         -----------           
      ServerName      Update          KB3192137 NT AUTHORITY\SYSTEM 9/12/2016 12:00:00 AM 
      ServerName      Update          KB4013418 NT AUTHORITY\SYSTEM 4/25/2017 12:00:00 AM 
      ServerName      Update          KB4023834 NT AUTHORITY\SYSTEM 6/14/2017 12:00:00 AM 
      ServerName      Update          KB4035631 NT AUTHORITY\SYSTEM 8/15/2017 12:00:00 AM 
      ServerName      Security Update KB4041691 NT AUTHORITY\SYSTEM 10/17/2017 12:00:00 AM
      
  • Get-Wulist and WSUS broken?
    1 Posts | Last post November 13, 2017
    • First off, love your module!  It's a huge help.  I was wondering if you could take a look at the Get-Wulist function?  The only way I could get the "WindowsUpdate" parameter to point to WSUS and the "Microsoft Update" parameter to point to MS public servers was to modify the section below.  Thanks!  
      
      ## Modified this part to point WindowsUpdate to WSUS and MicrosoftUpdate to Microsoft public update servers
      				If($WindowsUpdate)
      				{
      					Write-Debug "Set source of updates to Windows Update"
      					$objSearcher.ServerSelection = 1
      					$serviceName = "Windows Server Update Service"
      				} #End If $WindowsUpdate
      				ElseIf($MicrosoftUpdate)
      				{
      					Write-Debug "Set source of updates to Microsoft Update"
      					$serviceName = $null
      					Foreach ($objService in $objServiceManager.Services) 
      					{
      						If($objService.Name -eq "Windows Update")
      						{
      							$objSearcher.ServerSelection = 2
      							$objSearcher.ServiceID = $objService.ServiceID
      							$serviceName = $objService.Name
      							Break
      						}#End If $objService.Name -eq "Microsoft Update"
      					}#End ForEach $objService in $objServiceManager.Services
  • Install Windows 10 1703 patch
    2 Posts | Last post November 01, 2017
    • I'm trying to run this module on a PC with an older version of Windows 10. It ran the initial set of updates available. After a reboot I ran the  Install-WindowsUpdate -MicrosoftUpdate -AcceptAll -verbose command again and was prompted with a 5GB patch for Windows 10 1703. Several hours later after it had downloaded and installed I rebooted when prompted, however the patch hadn't installed. I ran Windows Update via the Settings menu and it installed the already downloaded patch.
      
      Did I stuff something up or is this module unable to install the major updates? After the 1703 update is installed I intend on updating to the 1709 update, will see if I encounter the same issue.
      
      Alternatively, is there a way to update Windows 10 from 16xx builds straight to 1709 via Powershell, or is the only way to run the installer via a 1709 ISO?
    • After 1703 finished installing I couldn't even get this module to detect 1709. It only detected after I opened Windows Update in the settings menu. Any ideas?
  • Get-WUList -MicrosoftUpdate Blank?
    2 Posts | Last post October 27, 2017
    • I have a few machines that always return nothing when I run either "Get-WUList -MicrosoftUpdate", or "Get-WUList -IsInstalled". If I run "Get-HotFix" I get a large list of installed updates but I just can't get it to return anything with this module. I've tried running "Add-WUServiceManager -ServiceID 7971f918-a847-4430-9279-4a52d1efe18d" first but still the same thing. Anyone else ever seen this? I'm pretty stumped and not sure what to try to fix it. This is a Windows 7 SP1 x64 machine running Powershell 5.
    • All this week I've had no problems.
      Then today I started having the problem you are seeing.
      My original script Installed the module using NuGet
      #Install-Module PSWindowsUpdate -Force
      
      I removed that and manually downloaded the PSWindowsUpdate PowerShell script and placed the files in:
      %USERPROFILE%\Documents\WindowsPowerShell\Modules
      %WINDIR%\System32\WindowsPowerShell\v1.0\Modules
      
      My scripts now calls PSWindowsUpdate as follows:
      Import-Module PSWindowsUpdate
      Add-WUServiceManager -ServiceID 7971f918-a847-4430-9279-4a52d1efe18d -confirm:$false
      Get-WUInstall -MicrosoftUpdate -AcceptAll -AutoReboot
  • Using Get-WUInstall in start-job or -AsJob process is only retriving update but not downloading or installing
    1 Posts | Last post October 10, 2017
    • Using Get-WUInstall in start-job or -AsJob process is only retriving update but not downloading or installing
      
      Invoke-Command -ComputerName $servers -ScriptBlock { Get-WUInstall -ServiceID "7971f918-a847-4430-9279-4a52d1efe18d" -AutoSelectOnly -AcceptAll -Confirm:$false -IgnoreUserInput  -Verbose | ft | Out-File C:\Temp\PSWindowsUpdate_$(Get-Date -Format mmddyy).log }  -ThrottleLimit 8 -AsJob
      
      is retrieving only updates in log file but not downloading and installing them? Is this because of it's looking for manual input accept to upgrade your module from online. I get this pop-up message everytime when I run the command using Invoke-WUInstall option.
  • How to auto approve UI which prompting me everytime select to upgrade your module version?
    1 Posts | Last post October 10, 2017
    • How to auto approve UI which prompting me everytime select to upgrade your module version?
  • Which Change Version Should I use for PowerShell 2.0?
    1 Posts | Last post October 03, 2017
    • I still have PS 2.0 on several of my 2008 R2 boxes...  Barring the process of upgrading those to version 3...  Which change revision should I use in order to use PSWindowsUpdate ??
      
      Running "Import-Module PSWindowsUpdate" returns the error "Unblock-file is not a recognized cmdlet".  That appears to be included in PS v3.
1 - 10 of 290 Items