‎12-22-2021 05:33 PM
‎12-23-2021 08:25 PM
‎12-27-2021 03:19 PM
TG wrote:
Hello! It is very close to what I was looking for. Now I can see all groups and the users listed inside it. The idea is to see users with local admin power only, I don't know if it is possible. What would be the parameter to change?
Thank you very much for your time supporting me.
Att.,
TG
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName As [Computer Name],
tblAssetCustom.Serialnumber As [Serial Number],
tblUsersInGroup.Username,
tblUsersInGroup.Domainname,
tblUsersInGroup.Groupname,
tblUsersInGroup.Admingroup
From tblAssets
Inner Join tblUsersInGroup On tblAssets.AssetID = tblUsersInGroup.AssetID
Inner Join lansweeperdb.dbo.tblAssetCustom On tblAssets.AssetID =
tblAssetCustom.AssetID
Inner Join lansweeperdb.dbo.tblComputersystem On tblAssets.AssetID =
tblComputersystem.AssetID
Where Case
When tblComputersystem.Domainrole > 1 Then 'Server'
Else 'Workstation'
End Like 'workstation'
Order By [Computer Name]
‎12-24-2021 02:30 PM
TG wrote:
Hello! It is very close to what I was looking for. Now I can see all groups and the users listed inside it. The idea is to see users with local admin power only, I don't know if it is possible. What would be the parameter to change?
Thank you very much for your time supporting me.
Att.,
TG
Select Distinct Top 1000000 tblAssets.AssetName,
tblUsersInGroup.AssetID,
tblAssets.Domain,
tblAssetCustom.Serialnumber,
Case
When (TsysChassisTypes.ChassisName = 'Desktop' Or
TsysChassisTypes.ChassisName = 'Mini Tower') Then 'Desktop'
When (TsysChassisTypes.ChassisName = 'Notebook' Or
TsysChassisTypes.ChassisName = 'Laptop' Or
TsysChassisTypes.ChassisName = 'Portable') Then 'Laptop'
When (TsysChassisTypes.ChassisName = 'Rack Mount' Or
TsysChassisTypes.ChassisName = 'Other') Then 'Server'
Else 'Other'
End As [Asset Type],
tblUsersInGroup.Domainname,
tblUsersInGroup.Username,
tblUsersInGroup.Groupname,
tsysOS.OSname,
tblUsersInGroup.Lastchanged,
tsysOS.Image As icon,
tblAssets.Lastseen
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
Left Join tblSystemEnclosure On tblAssets.AssetID = tblSystemEnclosure.AssetID
Left Join TsysChassisTypes On tblSystemEnclosure.ChassisTypes =
TsysChassisTypes.Chassistype
Left Join tblComputersystem On tblComputersystem.AssetID = tblAssets.AssetID
Where tblUsersInGroup.Groupname = 'administrators' And
tblComputersystem.Domainrole <= 1
Order By tblAssets.Domain,
tblAssets.AssetName,
tblUsersInGroup.Username
‎12-23-2021 07:24 PM
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName As [Computer Name],
tblAssetCustom.Serialnumber As [Serial Number],
tblUsersInGroup.Username,
tblUsersInGroup.Domainname,
tblUsersInGroup.Groupname
From tblAssets
Inner Join tblUsersInGroup On tblAssets.AssetID = tblUsersInGroup.AssetID
Inner Join lansweeperdb.dbo.tblAssetCustom On tblAssets.AssetID =
tblAssetCustom.AssetID
Inner Join lansweeperdb.dbo.tblComputersystem On tblAssets.AssetID =
tblComputersystem.AssetID
Where Case
When tblComputersystem.Domainrole > 1 Then 'Server'
Else 'Workstation'
End Like 'workstation'
Order By [Computer Name]
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now