Windowsupdate: Difference between revisions

From Piszczynski
piszczynski>Aleks
No edit summary
No edit summary
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:


== Windows Update ==
== 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:
View update logs - useful sometimes - go to this location:
Line 6: Line 12:
%windir%\Windowsupdate.log
%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.
Updates stored in Software distribution folder, stop windows update service and delete this folder to get windows to check and download updates again.


Line 20: Line 26:
https://catalog.update.microsoft.com
https://catalog.update.microsoft.com


 
----
Registry keys for configuring Automatic Updates & WSUS:
Registry keys for configuring Automatic Updates & WSUS:
*HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate
*HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate
Line 27: Line 33:
*HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\WindowsUpdate
*HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\WindowsUpdate
*HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate\AU
*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:<syntaxhighlight lang="powershell">
Get-WindowsUpdate
</syntaxhighlight>Install available updates<syntaxhighlight lang="powershell">
Install-WindowsUpdate
</syntaxhighlight>Download and install a specific update:<syntaxhighlight lang="powershell">
Get-WindowsUpdate -Install -KBArticleID 'KB5031445'
</syntaxhighlight>

Latest revision as of 16:36, 15 January 2024

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'