→ Celebrate SysAdmin Day 2024 with Lansweeper Enter our Giveaway here

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
dmeagle01
Engaged Sweeper
Can I request a report be created?

Id like to have a report that will tell me what users are not in a specific group. By group I mean like jdoe is missing from the AD group Domain Administrators.

1 ACCEPTED SOLUTION
MikeMc
Champion Sweeper II
This query should get you started. It will list all AD users not in the Domain Admins group.
Select tblADusers.Username,
tblADusers.Userdomain,
tblADusers.Firstname,
tblADusers.Lastname
From tblADusers
Where tblADusers.ADObjectID Not In (Select tblADMembership.ChildAdObjectID
From tblADMembership Inner Join tblADGroups On tblADGroups.ADObjectID =
tblADMembership.ParentAdObjectID Where tblADGroups.Name = 'Domain Admins')
Order By tblADusers.Username

View solution in original post

2 REPLIES 2
dmeagle01
Engaged Sweeper
Beautiful, appreciate it!
MikeMc
Champion Sweeper II
This query should get you started. It will list all AD users not in the Domain Admins group.
Select tblADusers.Username,
tblADusers.Userdomain,
tblADusers.Firstname,
tblADusers.Lastname
From tblADusers
Where tblADusers.ADObjectID Not In (Select tblADMembership.ChildAdObjectID
From tblADMembership Inner Join tblADGroups On tblADGroups.ADObjectID =
tblADMembership.ParentAdObjectID Where tblADGroups.Name = 'Domain Admins')
Order By tblADusers.Username