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 PSWindowsUpdateRun all updates without rebooting
Install-WindowsUpdate -MicrosoftUpdate -AcceptAll -IgnoreRebootOr with reboot
Install-WindowsUpdate -MicrosoftUpdate -AcceptAll -AutoReboot
Review Update History
Get-WUHistory
Ignore Specific Updates/KBs
Install-WindowsUpdate -NotKBArticleID KB5044284 -AcceptAll -IgnoreReboot