Windows Updates
Install Updates Via PowerShell
Powershell has to be at least version 5, run this command to check the version
$PSVersionTable.PSVersion
Install the Windows Update module
Install-Module PSWindowsUpdate
Get Updates for all Microsoft Products
Add-WUServiceManager -ServiceID 7971f918-a847-4430-9279-4a52d1efe18d
Show Available Updates
Get-WindowsUpdate -Verbose
Install All Updates
Install-WindowsUpdate -Verbose -AcceptAll
Install Specific Updates
Install-WindowsUpdate -Verbose -KBArticleID KB4533002
View Update History
Get-Wuhistory
Uninstall an Update
Remove-WindowsUpdate -KBArticleID KB4489873
Hide Updates
$HideList = "KB4489873", "KB4489883"
Hide-WindowsUpdate -KBArticleID $HideList –Hide
Documentation
http://woshub.com/pswindowsupdate-module/
Fix Failing Windows Updates
-
Open an admin terminal and stop the following services
net stop bits net stop wuauserv net stop appidsvc net stop cryptsvc
-
Delete the auto-update registry key, and rename the Windows Update cache folders
REG DELETE "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\" /V RebootRequired /F Ren %systemroot%\SoftwareDistribution SoftwareDistribution.bak Ren %systemroot%\system32\catroot2 catroot2.bak
-
Restart the services
net start bits net start wuauserv net start appidsvc net start cryptsvc
-
Restart the computer and run Windows Update again
Utility to Temporarily Hide Updates
http://download.microsoft.com/download/f/2/2/f22d5fdb-59cd-4275-8c95-1be17bf70b21/wushowhide.diagcab