SCCM Collection Queries - Active Directory Group (AP)

Hey,

We have SCCM 2007 up and running in our environment.

Does anyone know a query so that we can create a Collection for users? More importantly, a Collection of users that aren't in a certain group/groups?

Thanks
LVL 1
tlcsupportAsked:
Who is Participating?
 
merowingerConnect With a Mentor Commented:
Here we go. All Users which aren't in GroupA or GroupB
SELECT SMS_R_USER.ResourceID,SMS_R_USER.ResourceType,SMS_R_USER.Name,SMS_R_USER.UniqueUserName,SMS_R_USER.WindowsNTDomain 
FROM SMS_R_User 
WHERE SMS_R_User.ResourceID NOT IN 
								(SELECT ResourceID 
								FROM SMS_R_User 
								WHERE SMS_R_User.UserGroupName = 'Domain\\GroupA' OR SMS_R_User.UserGroupName = 'Domain\\GroupB')

Open in new window

0
 
ActiveDirectorymanCommented:


first you need to enable the correct discovery method.  active directory group discovery and system group discovery.

0
 
merowingerCommented:
The correct Discovery method to enable is Active Directory User Discovery
http://technet.microsoft.com/de-de/library/dd334565.aspx
http://www.myitforum.com/forums/m177208-print.aspx
0
 
tlcsupportAuthor Commented:
Yeah I've got the discovery working.

Its just the collections that I'm having problems with.

I need to create a collection to find users that aren't in AD Group A, or AD Group B.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.