Push Windows updates with Powershell

- Words
2025-02-07

Executing Windows updates using Powershell

~Many thanks to my colleague for the below scripts.


Command List

Import the Exchange Online Management Module and Connect to Exchange Online

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
Install-Module -Name PSWindowsUpdate -Force
Import-Module PSWindowsUpdate

Run all updates without rebooting

Install-WindowsUpdate -MicrosoftUpdate -AcceptAll -IgnoreReboot

Or with reboot

Install-WindowsUpdate -MicrosoftUpdate -AcceptAll -AutoReboot

 

Review Update History

Get-WUHistory

 

Ignore Specific Updates/KBs

Install-WindowsUpdate -NotKBArticleID KB5044284 -AcceptAll -IgnoreReboot

 


Jozef
Author