PoshWSUSUpdateClassification

Apr 29, 2013 at 2:21 PM
Hi,

I try to run a report for a group for specifics update classification.

I don't succeed to join all my code :

Get-PoshWSUSUpdatePerClient -ComputerName 'my_computer' -UpdateScope (New-PoshWSUSUpdateScope -IncludedInstallationStates notinstalled)

Get-PoshWSUSUpdateClassification | Where {$_.Title -eq "Updates"}

Please help !
May 3, 2013 at 1:33 PM
I answer too...

Adding this code : https://poshwsus.codeplex.com/workitem/30

And this one :

Connect-PoshWSUSServer -WsusServer mywsusserver
$clients = Get-PoshWSUSClientsInGroup -name "mygroup"
$alltheupdates = foreach ($client in $clients)
{
Get-PoshWSUSUpdatePerClient -ComputerName $client.FullDomainName -UpdateScope (New-PoshWSUSUpdateScope -IncludedInstallationStates "NotInstalled")
Get-PoshWSUSUpdatePerClient -ComputerName $client.FullDomainName -UpdateScope (New-PoshWSUSUpdateScope -IncludedInstallationStates "Downloaded")
}
foreach ($update in $alltheupdates)
{
$kb = Get-PoshWSUSUpdate -Update $update.UpdateKB | select -First 1
if ($kb.UpdateClassificationTitle -Match "Critical Updates")
    {
        write-host $update.Computername $kb.Title $update.UpdateKB $update.UpdateInstallationState $kb.UpdateClassificationTitle
    }
if ($kb.UpdateClassificationTitle -Match "Security Updates")
    {
        write-host $update.Computername $kb.Title $update.UpdateKB $update.UpdateInstallationState $kb.UpdateClassificationTitle
    }
}