→ 🚀What's New? Join Us for the Fall Product Launch! Register Now !

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

is there way to create a report that will show all Users with Domain administrators rights?

thanks
1 ACCEPTED SOLUTION
Susan_A
Lansweeper Alumni
You can use the report below to list users that are in the Domain Admins group. Instructions for adding this report to your Lansweeper installation can be found here. If you are interested in building or modifying reports, we do recommend:
  • Reviewing some SQL tutorials, as the Lansweeper report builder is a standard SQL editor. If you know SQL, you know how to build Lansweeper reports as well. This seems like a good tutorial.
  • Making use of our database dictionary, more information on which can be found here. The dictionary explains in great detail what each table and field stores.

Select Top 1000000 tblADusers.Username,
tblADusers.Userdomain,
tblADusers.Firstname,
tblADusers.Lastname,
tblADusers.Name,
tblADusers.Displayname,
tblADGroups.Name As [Group]
From tblADMembership
Inner Join tblADusers On tblADMembership.ChildAdObjectID =
tblADusers.ADObjectID
Inner Join tblADGroups On tblADMembership.ParentAdObjectID =
tblADGroups.ADObjectID
Where tblADGroups.Name = 'Domain Admins'
Order By tblADusers.Userdomain,
tblADusers.Username

View solution in original post

4 REPLIES 4
Jeremy_D
Champion Sweeper
SysIT wrote:
How could this query be edited to include only active accounts and not include disabled accounts? Or to mark disabled accounts in a different manner, include a field for disabled or active?

Lansweeper, by default, does not scan disabled Active Directory users. A disabled user can only be present in the Lansweeper database if the account was initially enabled when scanned, but then disabled afterwards. There is no database field that indicates whether or not a user account is disabled, so you cannot add a filter for this to the report.

The only way for disabled Active Directory users to no longer appear in your report would be to delete them from your Lansweeper installation. We recommend letting the database cleanup options take care of that chore for you. Please do the following:
  • Browse to Configuration\Server Options.
  • Check the following items under the User Cleanup Options section:
    Remove users not found in Active Directory from the Lansweeper database.
    Remove users disabled in Active Directory from the Lansweeper database.

Please keep in mind that database cleanup options are only triggered when the Lansweeper Server service is started and subsequently every 24 hours. More information on database cleanup options can be found in this knowledge base article.
SysIT
Engaged Sweeper II
How could this query be edited to include only active accounts and not include disabled accounts? Or to mark disabled accounts in a different manner, include a field for disabled or active?
echernov
Engaged Sweeper
thank you !!!!!
Susan_A
Lansweeper Alumni
You can use the report below to list users that are in the Domain Admins group. Instructions for adding this report to your Lansweeper installation can be found here. If you are interested in building or modifying reports, we do recommend:
  • Reviewing some SQL tutorials, as the Lansweeper report builder is a standard SQL editor. If you know SQL, you know how to build Lansweeper reports as well. This seems like a good tutorial.
  • Making use of our database dictionary, more information on which can be found here. The dictionary explains in great detail what each table and field stores.

Select Top 1000000 tblADusers.Username,
tblADusers.Userdomain,
tblADusers.Firstname,
tblADusers.Lastname,
tblADusers.Name,
tblADusers.Displayname,
tblADGroups.Name As [Group]
From tblADMembership
Inner Join tblADusers On tblADMembership.ChildAdObjectID =
tblADusers.ADObjectID
Inner Join tblADGroups On tblADMembership.ParentAdObjectID =
tblADGroups.ADObjectID
Where tblADGroups.Name = 'Domain Admins'
Order By tblADusers.Userdomain,
tblADusers.Username