‎09-24-2018 03:13 PM
‎09-25-2018 12:00 AM
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...
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
‎11-20-2024 04:49 PM
This report appears broken now.
a month ago
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
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now