Tuesday, October 28, 2014

How to use Get-CMDevice to get all clients from a collection in CM2012 using PowerShell

This one is easy if you are looking at the right cmdlet ;)


Get-CMDevice -CollectionID
or
Get-CMDevice -CollectionName


don't forget if you are getting too much data back you can always pipe to Select-Object


Get-CMDevice -CollectionName 'My CM2012 Collection' | Select-object  Name,ADSiteName


If you find this article useful please leave me a comment.

No comments :

Post a comment