Managing WSUS Updates
Microsoft produces a large number of updates and has ever since Microsoft first introduced WSUS
. You can manage these updates via the GUI
or PowerShell. As with other aspects of managing WSUS
, managing updates via PowerShell means using the WSUS
server object and its associated methods.
Getting ready
You run this recipe on SRV1
after installing and configuring WSUS
on WSUS1
.
How to do it...
- Creating a remoting session to
WSUS1
$SessionHT = @{ ConfigurationName = 'microsoft.powershell' ComputerName = 'WSUS1' Name = 'WSUS' } $Session = New-PSSession @SessionHT
- Viewing the status of
WSUS1
Invoke-Command -Session $Session -ScriptBlock { $WSUSServer = Get-WsusServer $WSUSServer.GetStatus() }
- Viewing computer targets
Invoke-Command -Session $Session -ScriptBlock { $WSUSServer.GetComputerTargets() | Sort-Object -Property FullDomainName...