• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 722
  • Last Modified:

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
0
tlcsupport
Asked:
tlcsupport
  • 2
1 Solution
 
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
 
merowingerCommented:
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

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now