Windows Update using PowerShell on Windows 2012 R2 Server

I don’t see there is any build in PowerShell to perform Windows Update on Windows 2012 R2 Server, and after some research, I manage to find the great information on this topic from PowerShell for Windows Update

Please refer to the following PowerShell Script to download the PowerShell Module, extract and install it

You will need to run “Get-WUInstall -Verbose” few time to ensure that there is no more update for Windows 2012 R2


I will need to cleanup the downloaded Update in WinSxS folder by using the following commands ( “Desktop Experience” features is required to use the Disk Cleanup in GUI, and since I want to keep my Windows 2012 R2 Server as clean as possible with minimum space). I noticed that it take up 12.5GB of hard disk spaces with only the latest Windows updates installed

With the above commands, it will helps to free up some disk spaces