How to excude a machine from a collection.
I have a lab name 4a15-01 - 4a15-40, one of the staff members office pc is named 4A15-serial number of the pc. I have been using sql queries to automatically put machines in the proper collection using the system resource, netbios name and the is like command with 4A15-%. My problem is doing this picks up the teachers pc as well and puts it in the 4A15.Lab collection. Is there anyway I could exclude this pc by adding another sql query on the collection?
September 8th, 2012 12:25pm

You can use a sub select Query to exclude members of a specific Collection: select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System where SMS_R_System.Client = 1 and SMS_R_System.ClientType = 1 and SMS_R_System.ResourceId not in (select ResourceID from SMS_CM_RES_COLL_SMS000ES) Kent Agerlund | My blogs: blog.coretech.dk/kea and SCUG.dk/ | Twitter: @Agerlund | Linkedin: Kent Agerlund | Mastering ConfigMgr 2012 The Fundamentals
Free Windows Admin Tool Kit Click here and download it now
September 8th, 2012 12:54pm

Thank you Kent, your help is always appreciated.
September 9th, 2012 10:41am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics