Membership Rule

Glenn Maxwell 10,146 Reputation points
2022-01-03T18:57:37.333+00:00

Hi All

i have a OU in Active Directory lets say Test. i have a collection by Name TestCollection in configuration manager. I want to create a Membership Rule that all the servers which are in the Test OU should reflect in this TestCollection.
i.e When any new computer is added to Test OU in Active Directory, it should reflect in TestCollection in Configuration Manager. Experts guide me how to create this membership rule.

Microsoft Configuration Manager
0 comments No comments
{count} votes

Accepted answer
  1. AllenLiu-MSFT 40,961 Reputation points Microsoft Vendor
    2022-01-10T02:41:36.677+00:00

    Hi, @Glenn Maxwell

    The query should look like this:

    select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.Client  from SMS_R_System where SMS_R_System.SystemOUName = "mydomain.com/OU/Win1" and SMS_R_System.OperatingSystemNameandVersion like "%Server%"  
      
    select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.Client  from SMS_R_System where SMS_R_System.SystemOUName = "mydomain.com/OU/Win2" and SMS_R_System.OperatingSystemNameandVersion like "%Server%"  
    

3 additional answers

Sort by: Most helpful
  1. Garth 5,801 Reputation points
    2022-01-03T20:47:40.093+00:00

    There are no tricks to this you select the ou for one requirement and you select the server attribute for the second. What have you tried, what isn't working for you?

    0 comments No comments

  2. AllenLiu-MSFT 40,961 Reputation points Microsoft Vendor
    2022-01-04T02:09:46.873+00:00

    Hi, @Glenn Maxwell
    Thank you for posting in Microsoft Q&A forum.

    We may create a collection with query rule with the following query, remember to replace your OU name:

    select * from SMS_R_System where SMS_R_System.SystemOUName = "xxx.xxx/Test" and SMS_R_System.OperatingSystemNameandVersion like "%Server%"  
    

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



  3. Glenn Maxwell 10,146 Reputation points
    2022-01-07T21:40:18.197+00:00

    I have a collection lets say TestCollection, i have two OUs, Win1 and Win2, all the server operating system objects from these OUs should be imported in the TestCollection. Lets say after one year, i will come up with another OU Win3 and when i add win3 to this collection i dont want any impact on Win1 and Win2

    Please correct me if the below syntax is correct

    select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_System.OperatingSystemNameandVersion like "%Server%",SMS_R_SYSTEM.Client 
    from SMS_R_System where SMS_R_System.SystemOUName like "mydomain.com/OU/Win1"
    
    select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_System.OperatingSystemNameandVersion like "%Server%",SMS_R_SYSTEM.Client 
    from SMS_R_System where SMS_R_System.SystemOUName like "mydomain.com/OU/Win2"
    
    0 comments No comments