Summary of updates needed, per PC

Jun 24, 2014 at 12:21 PM
Anyone know how to use these cmdlets to get a list of computers and how many installed/needed/failed updates they have, as it appears in the WSUS gui?

Documentation(?) not really a lot of help with this...

Ta
Jun 24, 2014 at 12:31 PM
Edited Jun 24, 2014 at 1:02 PM
Typical.. found this...
$computerscope = New-Object Microsoft.UpdateServices.Administration.ComputerTargetScope

$updatescope = New-Object Microsoft.UpdateServices.Administration.UpdateScope

$wsus.GetSummariesPerComputerTarget($updatescope,$computerscope) |
    Select @{L='ComputerTarget';E={($wsus.GetComputerTarget([guid]$_.ComputerTargetId)).FullDomainName}},
        @{L='NeededCount';E={($_.DownloadedCount _+ $_.NotInstalledCount)}},DownloadedCount,NotApplicableCount,NotInstalledCount,InstalledCount,FailedCount
And translated it to this:
(Get-PoshWSUSUpdateSummaryPerClient -UpdateScope (new-poshwsusupdatescope) -ComputerScope (new-poshwsuscomputerscope)) | Select Computer,NeededCount,DownloadedCount,NotApplicableCount,NotInstalledCount,InstalledCount,FailedCount|ft -auto