Jump to content




Sign in to follow this  
Steve0

Create 2 collections from AD group and return only the users/machines in both collections



Recommended Posts

I have a requirement to create 2 collections from AD groups and return only the users/machines that are in both.

I have tried something like the following:-

SELECT 

...

WHERE ResourceID IN (SELECT ResourceID FROM SMS_R_User where SMS_R_User.SecurityGroupName = <GroupA>) 

AND ResourceID IN (SELECT ResourceID FROM SMS_R_User where SMS_R_User.SecurityGroupName = <GroupB>)

 

But if a user is in both groups the result is 0 not the expected result

 

e.g

Collection from ADGroup1 = 12345

Collection from ADGroup2 = 34567

Collection items in ADGroup1 and ADGroup2 = 345

Share this post


Link to post
Share on other sites


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


×