Windowsupdate

From Piszczynski

Windows Update

Windows Updates is dependant on the following services, check these if updates are failing or having issues:

  • Windows Update Service - wuauserv
  • Update Orchestrator Service -usosvc
  • Background Intelligent Transfer Service - BITS
  • Windows Modules Installer - Trusted installer

View update logs - useful sometimes - go to this location:

%windir%\Windowsupdate.log


Updates stored in Software distribution folder, stop windows update service and delete this folder to get windows to check and download updates again.


If updates still fail do sfc /scannow to check system files


Check for any updates that are required for the updates that you are installing.


Website to download specific update packages:

https://catalog.update.microsoft.com


Registry keys for configuring Automatic Updates & WSUS:

  • HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate
  • HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
  • HKEY_LOCAL_MACHINE\SYSTEM\Internet Communication Management\Internet Communication
  • HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\WindowsUpdate
  • HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate\AU

Run Updates from CMD: Go to Run –> cmd Run the following command to check for new updates:

  • wuauclt /detectnow

Run the following command to install new updates

  • wuauclt /updatenow

Get current windows build

  • Get-CimInstance -Class win32_operatingsystem | fl

Can also look at the following registry entry for windows server 2012r2:

  • HKLM:\SOFTWARE\Microsoft\Windows NT\

Get list of all installed updates and pipe to the clipboard:

  • dism /online /get-packages | clip

Get all hot fixes installed:

  • get-hotfix

Uninstall updates

Uninstall windows update packages with the following command:

  • wusa /uninstall /kb:5009543

Updates with Powershell

Use the PSWindowsUpdate powershell module:

Get available windows updates:

Get-WindowsUpdate

Install available updates

Install-WindowsUpdate

Download and install a specific update:

Get-WindowsUpdate -Install -KBArticleID 'KB5031445'