→ Having trouble accessing our new support portal or creating a ticket? Please notify our team here

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Ismail
Engaged Sweeper II
Hello,

I'm looking for a report that lists all users in specific group that is residing in domain.com/Builtin at our AD domain.

I already have a report that lists all users in domain plus where they are residing (As in which OU) I would like a report shows below information only if user is part of a specific group called "Internet Users" that is residing in domain.com/Builtin

Select Top 1000000 tblADusers.Username,
tblADusers.Displayname,
tblADusers.email,
tblADusers.EmployeeID,
Replace(Replace(Replace(Replace(tblADusers.OU, 'OU=Users,', ''),
',DC=domain,', ''), 'DC=com', ''), 'OU=', '') As Department
From tblADusers


1 ACCEPTED SOLUTION
Hemoco
Lansweeper Alumni
Can you please try to use the following report:

Select Top 1000000 tblADusers.Username,
tblADusers.Displayname,
tblADusers.email,
tblADusers.EmployeeID,
Replace(Replace(Replace(Replace(tblADusers.OU, 'OU=Users,', ''),
',DC=domain,', ''), 'DC=com', ''), 'OU=', '') As Department,
tblADGroups.Name
From tblADusers
Inner Join tblADMembership On tblADusers.ADObjectID =
tblADMembership.ChildAdObjectID
Inner Join tblADGroups On tblADMembership.ParentAdObjectID =
tblADGroups.ADObjectID
Where tblADGroups.Name = 'internet users'

To use the report above, do the following:
•Open the report builder under Reports/Create New Report.
•Paste the SQL code we provided at the bottom of the page.
•Left-click somewhere in the upper section of the page so the code applies.
•Give the report a Title and hit the Save & Run button to save it. Export options are listed on the left.

View solution in original post

2 REPLIES 2
Ismail
Engaged Sweeper II
Perfect! Thank you very much.
Hemoco
Lansweeper Alumni
Can you please try to use the following report:

Select Top 1000000 tblADusers.Username,
tblADusers.Displayname,
tblADusers.email,
tblADusers.EmployeeID,
Replace(Replace(Replace(Replace(tblADusers.OU, 'OU=Users,', ''),
',DC=domain,', ''), 'DC=com', ''), 'OU=', '') As Department,
tblADGroups.Name
From tblADusers
Inner Join tblADMembership On tblADusers.ADObjectID =
tblADMembership.ChildAdObjectID
Inner Join tblADGroups On tblADMembership.ParentAdObjectID =
tblADGroups.ADObjectID
Where tblADGroups.Name = 'internet users'

To use the report above, do the following:
•Open the report builder under Reports/Create New Report.
•Paste the SQL code we provided at the bottom of the page.
•Left-click somewhere in the upper section of the page so the code applies.
•Give the report a Title and hit the Save & Run button to save it. Export options are listed on the left.

New to Lansweeper?

Try Lansweeper For Free

Experience Lansweeper with your own data.
Sign up now for a 14-day free trial.

Try Now