Quantcast
Channel: WSUS forum
Viewing all articles
Browse latest Browse all 12874

Using the Get-WsusUpdate cmdlet in PowerShell, ComputersNeedingThisUpdate always shows zero

$
0
0

I've written a PowerShell script for email notification of WSUS updates awaiting approval.  The problem I'm having is that the ComputersNeedingThisUpdate property always shows zero, even when there are computers which need the update.  The other Computers counts match the WSUS MMC Snap-In, just the ComputersNeedingThisUpdate is wrong.  Any ideas out there?  Is this a bug in the WSUS PowerShell Module?

I'm running WSUS on Windows Server 2012.  The script is as follows:

$UpdNeeded = Get-WsusUpdate -Approval Unapproved -Status FailedOrNeeded $txt_body = "Updates with Errors or Awaiting Approval`n`n" ForEach ($Upd in $UpdNeeded) { $txt_body += $Upd.Update.Title+"`n" $txt_body += $Upd.Update.Description+"`n" $txt_body += "Computers Needing Update: "+$Upd.ComputersNeedingThisUpdate+"`n" $txt_body += "Computers With Errors: "+$Upd.ComputersWithErrors+"`n" }

If ($UpdNeeded.Count -gt 0) {
# Send Email
}




Viewing all articles
Browse latest Browse all 12874

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>