How To Find Deployments Targeted at a Client in SCCM with PowerShell

Adam Bertram

Adam Bertram

Read more posts by this author.

At my place of employment’s PCs are way out of date with updates. Unfortunately there’s over 2,000+ patches that have to be made available to workstations during deployments. Due to SCCM’s 1,000 update per deployment rule 5 different software update groups were created along with 5 different deployments. Some clients were receiving all deployments but some were not. It was getting frustrating spot-checking 800 PCs to see if they were queued up ready for the maintenance window.

With a few minutes of browsing the ConfigMgr 2012 SDK documentation I found the CCM_AssignmentCompliance class in the DeploymentAgent namespace would get me a list of all deployments each client sees. Once I had the WMI class I needed the rest was cake! I was going to see if I could find the actual deployment name but it was getting late and I didn’t much care at the time.

Get-WmiObject -Namespace 'root\ccm\softwareupdatesdeploymentagent' -ComputerName $computer -Class 'ccm_assignmentcompliance' | % {$_.AssignmentId}

I hope this saves any other SCCM admins some time.

Subscribe to Adam the Automator

Get the latest posts delivered right to your inbox

Looks like you're offline!