cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JJacob
Engaged Sweeper
Hi,
Is there any way I could get a list of all Local User Accounts from all the systems in the domain via Lansweeper, preferably in csv, txt or xls format?

Any reports for the same available in lansweeper?

Any help appreciated...
3 REPLIES 3
AZHockeyNut
Champion Sweeper III
JJacob wrote:
Hi,
Is there any way I could get a list of all Local User Accounts from all the systems in the domain via Lansweeper, preferably in csv, txt or xls format?

Any reports for the same available in lansweeper?

Any help appreciated...


I believe you should post this in the Reports Requests area and maybe one of the Mods will move it there.
Anyhow, I adapted a report someone had made for me that returns all groups and users that have local admin. So it might be close to what you want.


Select Top 1000000 A.AssetID,
A.AssetName,
G.Username As 'User or Group Name',
G.Domainname As 'PC or Domain Name',
V.Username As 'View User Name',
(Case S.ADObjectID When (Select tblADusers.ADObjectID From tblADusers
Where tblADusers.ADObjectID = S.ADObjectID) Then 'USER'
When (Select tblADGroups.ADObjectID From tblADGroups
Where tblADGroups.ADObjectID = S.ADObjectID) Then 'GROUP' Else 'LOCAL'
End) As 'Permissions From',
G.Groupname As 'Local Group Name on Asset'
From tblAssets A
Inner Join tblUsersInGroup G On A.AssetID = G.AssetID
Inner Join tblAssetCustom C On A.AssetID = C.AssetID
Left Outer Join tblADObjects S On S.sAMAccountName = G.Username And
S.domain = G.Domainname
Left Join web50repfec49c298d2a49e3a80f08adbd7347bc V On V.ADGroupID =
S.ADObjectID
Where (a.assetname = g.domainname) And C.State = 1
Order By A.AssetName

This report appears broken now.

KevinA-REJIS
Champion Sweeper III

I created this one that shows local users on the asset, what groups they're in, and if they're enabled/disabled:

Select Top 1000000 tblAssets.AssetID,
  tblAssets.AssetName,
  tsysAssetTypes.AssetTypename,
  tsysAssetTypes.AssetTypeIcon10 As icon,
  tblAssets.IPAddress,
  tblUsersInGroup.Groupname As LocalGroupName,
  tblUsersInGroup.Domainname As DomainName,
  tblUsersInGroup.Username As UserName,
  tblUsers.Disabled As Disabled,
  tblAssets.Lastseen,
  tblAssets.Lasttried
From tblAssets
  Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
  Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
  Inner Join tblUsersInGroup On tblAssets.AssetID = tblUsersInGroup.AssetID
  Inner Join tblOperatingsystem On tblOperatingsystem.AssetID =
      tblAssets.AssetID
  Inner Join tblUsers On tblAssets.AssetID = tblUsers.AssetID
Where tblAssetCustom.State = 1
Order By tblAssets.AssetName,
  tblUsersInGroup.GroupName