powershell w/ sccm for collections – part 1
while i’m working through a script i’m trying to create, here’s a list of commands discovered to work with collections.
retrieve a list of collections from a sccm server:
get-wmiobject -namespace 'root\sms\site_<sitecode>' -class 'sms_collection' | format-table collectionid, name
retrieve a list of members from a collection:
get-wmiobject -namespace 'root\sms\site_<sitecode>' -query 'select * from sms_cm_res_coll_SMS00001' | format-table resourceid, name
Comments
Post a Comment