PSWindowsUpdate module for PowerShell to manage Windows updates from the command line interface. The PSWindowsUpdate is not integrated into Windows and is a third-party module available in Technet Script Gallery. (v 1.5.6. While the NuGet package manager installs PSWindowsUpdate 188.8.131.52 from the PowershellGallery)
PSWindowsUpdate allows administrators to remotely check, install, remove and hide updates on Windows servers and workstations. The PSWindowsUpdate module is especially valuable to manage updates on Windows Server Core, Hyper-V editions having no graphic interface, as well as when configuring a Windows image in the audit mode.
Install-Module -Name PSWindowsUpdate
I f an older Version is installed on your computer you need to run
Install-Module -Name PSWindowsUpdate –Force
Import the module into your PowerShell session:
Remote Install on other computers or servers use the
Update-WUModule cmdlet. (you need access the remote servers via SMB protocol, TCP port 445)
$Servers = "Server01", "Server02"
Update-WUModule -ComputerName $Servers –Local
Solution Firewall Problem: