rrasco Posted January 31, 2013 Report post Posted January 31, 2013 I am trying to have my device collections automatically update based on the OU each device is a member of. I found some example for doing this with user collections, but no clear cut way to do it with devices. I found an article on Technet and am trying to use this query to add devices from the 'Desktops' OU to my device collection. It doesn't seem to be working, or it is working slowly. I wasn't sure what log would contain the activity for collection membership updates. Is this the only way to do this? Is there anyway to be more granular with specifying the OU, would if there are two 'Desktop' OUs? Unless I'm supposed to be putting the full path...? 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.SystemOUName = "Desktops" http://technet.microsoft.com/en-us/library/gg712323.aspx Quote Share this post Link to post Share on other sites More sharing options...
Peter33 Posted January 31, 2013 Report post Posted January 31, 2013 Instead of = "Desktops" use Like "%Desktops%". Quote Share this post Link to post Share on other sites More sharing options...
rrasco Posted January 31, 2013 Report post Posted January 31, 2013 That worked. Thank you sir! Quote Share this post Link to post Share on other sites More sharing options...
Rocket Man Posted January 31, 2013 Report post Posted January 31, 2013 Is this the only way to do this? No, do it the simple way!! ConfigMgr has all this built in. Create a new collection name it appropriately, limit it to all systems. Edit membership and use query rule and give it a name. Click on Edit Query Statement and click criteria tab, click yellow startburst. On Criterion properties click select On attribute class scroll to system resource On attribute scroll to System OU Name Click OK On Opertator scroll to lowercase is like At this stage you can click the value button and this should populate all your OUs from AD, just simply select the appropriate OU and click OK through the rest until collection is created!! If your OU is nested and not showing just simply type the rest of the path manually into the value field. Enjoy!! Rocket Man Quote Share this post Link to post Share on other sites More sharing options...
rrasco Posted January 31, 2013 Report post Posted January 31, 2013 No, do it the simple way!! ConfigMgr has all this built in. Create a new collection name it appropriately, limit it to all systems. Edit membership and use query rule and give it a name. Click on Edit Query Statement and click criteria tab, click yellow startburst. On Criterion properties click select On attribute class scroll to system resource On attribute scroll to System OU Name Click OK On Opertator scroll to lowercase is like At this stage you can click the value button and this should populate all your OUs from AD, just simply select the appropriate OU and click OK through the rest until collection is created!! If your OU is nested and not showing just simply type the rest of the path manually into the value field. Enjoy!! Rocket Man I was trying to do it that way to begin with, but I couldn't figure out the details or find documentation for it. Thanks for the details instructions! Quote Share this post Link to post Share on other sites More sharing options...