→ Celebrate SysAdmin Day 2024 with Lansweeper Enter our Giveaway here

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
laurentiune
Engaged Sweeper
Hello,
I would like to have a report with local administrators group. Domain members of the "administrators" group from each computer and option to exclude built in users like "administrator" or other custom users.

Thank you.
1 ACCEPTED SOLUTION
Hemoco
Lansweeper Alumni
You can use the following report. You need to change the red word with the name of the user that you want to exclude from the report.


Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblUsersInGroup.Username,
tblUsersInGroup.Domainname,
tblUsersInGroup.Groupname
From tblAssets
Inner Join tblUsersInGroup On tblAssets.AssetID = tblUsersInGroup.AssetID
Inner Join tblADusers On tblUsersInGroup.Username = tblADusers.Username And
tblUsersInGroup.Domainname = tblADusers.Userdomain
Where tblUsersInGroup.Username <> 'name user' And tblUsersInGroup.Groupname =
'administrators'
Order By tblAssets.AssetName

View solution in original post

1 REPLY 1
Hemoco
Lansweeper Alumni
You can use the following report. You need to change the red word with the name of the user that you want to exclude from the report.


Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblUsersInGroup.Username,
tblUsersInGroup.Domainname,
tblUsersInGroup.Groupname
From tblAssets
Inner Join tblUsersInGroup On tblAssets.AssetID = tblUsersInGroup.AssetID
Inner Join tblADusers On tblUsersInGroup.Username = tblADusers.Username And
tblUsersInGroup.Domainname = tblADusers.Userdomain
Where tblUsersInGroup.Username <> 'name user' And tblUsersInGroup.Groupname =
'administrators'
Order By tblAssets.AssetName