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

I would like to know how I can scan the Computers, to see if the users got admin rights.
Is that possible with Lansweeper?

Thank you for your answers.

Best Regards
Root
1 ACCEPTED SOLUTION
Daniel_B
Lansweeper Alumni
Lansweeper scans users and groups from Windows computers. After successfully scanning your computers, you can run a report like the following, which will list all users member of a local administrator group:

Select Top 1000000 tblAssets.AssetUnique,
tblUsersInGroup.AssetID,
tblAssets.Domain,
tblAssets.Description,
tblUsersInGroup.Domainname,
tblUsersInGroup.Username,
tblUsersInGroup.Lastchanged,
tsysOS.Image As icon
From tblUsersInGroup
Inner Join tblAssets On tblUsersInGroup.AssetID = tblAssets.AssetID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Where tblUsersInGroup.Admingroup = 1 And tblAssetCustom.State = 1
Order By tblAssets.AssetName

View solution in original post

4 REPLIES 4
Tom_P
Lansweeper Employee
Lansweeper Employee
Hi,

To exclude specific usernames, the following filter can be added to the query:
tblUsersInGroup.Username not in ('Administrator', 'admin', 'user2k')

Added to the query this gives the following code:

Select Top 1000000 tblAssets.AssetUnique,
tblUsersInGroup.AssetID,
tblAssets.Domain,
tblAssets.Description,
tblUsersInGroup.Domainname,
tblUsersInGroup.Username,
tblUsersInGroup.Lastchanged,
tsysOS.Image As icon
From tblUsersInGroup
Inner Join tblAssets On tblUsersInGroup.AssetID = tblAssets.AssetID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Where tblUsersInGroup.Admingroup = 1 And tblAssetCustom.State = 1
and tblUsersInGroup.Username not in ('Administrator', 'admin', 'user2k')
Order By tblAssets.AssetName
Root
Engaged Sweeper
Hello Daniel.B

Thanks for the fast reply. I will test it right now.

Regards
Root
Daniel_B
Lansweeper Alumni
Lansweeper scans users and groups from Windows computers. After successfully scanning your computers, you can run a report like the following, which will list all users member of a local administrator group:

Select Top 1000000 tblAssets.AssetUnique,
tblUsersInGroup.AssetID,
tblAssets.Domain,
tblAssets.Description,
tblUsersInGroup.Domainname,
tblUsersInGroup.Username,
tblUsersInGroup.Lastchanged,
tsysOS.Image As icon
From tblUsersInGroup
Inner Join tblAssets On tblUsersInGroup.AssetID = tblAssets.AssetID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Where tblUsersInGroup.Admingroup = 1 And tblAssetCustom.State = 1
Order By tblAssets.AssetName
How to i use this report and ommit names i dont want it to list since they are local admins per our image.
So i can filter out just users with local admin.

For example: dont include Administrator, admin, user2k

Is that possible?

Daniel.B wrote:
Lansweeper scans users and groups from Windows computers. After successfully scanning your computers, you can run a report like the following, which will list all users member of a local administrator group:

Select Top 1000000 tblAssets.AssetUnique,
tblUsersInGroup.AssetID,
tblAssets.Domain,
tblAssets.Description,
tblUsersInGroup.Domainname,
tblUsersInGroup.Username,
tblUsersInGroup.Lastchanged,
tsysOS.Image As icon
From tblUsersInGroup
Inner Join tblAssets On tblUsersInGroup.AssetID = tblAssets.AssetID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Where tblUsersInGroup.Admingroup = 1 And tblAssetCustom.State = 1
Order By tblAssets.AssetName