‎06-16-2015 08:57 PM
Solved! Go to Solution.
‎06-17-2015 02:21 PM
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetUnique,
tblAssets.Description,
tblAssets.Domain As Computer_Domain,
tblADComputers.OU,
tblComputersystem.Domainrole,
tblAssets.Lastseen
From tblAssets
Inner Join tblUsersInGroup On tblAssets.AssetID = tblUsersInGroup.AssetID
Inner Join tblComputersystem On tblAssets.AssetID = tblComputersystem.AssetID
Inner Join tblAssetGroupLink On tblAssets.AssetID = tblAssetGroupLink.AssetID
Inner Join tblADComputers On tblAssets.AssetID = tblADComputers.AssetID
Where tblAssets.AssetID Not In (Select tblUsersInGroup.AssetID
From tblUsersInGroup
Where tblUsersInGroup.Groupname Like 'Admin%' And
tblUsersInGroup.Username Like 'Service Desk%') And
tblADComputers.OU Like '%OU1%' And tblComputersystem.Domainrole < 2 And
tblUsersInGroup.Accounttype = 1
Order By tblAssets.AssetName
‎06-17-2015 03:08 PM
‎06-17-2015 02:21 PM
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetUnique,
tblAssets.Description,
tblAssets.Domain As Computer_Domain,
tblADComputers.OU,
tblComputersystem.Domainrole,
tblAssets.Lastseen
From tblAssets
Inner Join tblUsersInGroup On tblAssets.AssetID = tblUsersInGroup.AssetID
Inner Join tblComputersystem On tblAssets.AssetID = tblComputersystem.AssetID
Inner Join tblAssetGroupLink On tblAssets.AssetID = tblAssetGroupLink.AssetID
Inner Join tblADComputers On tblAssets.AssetID = tblADComputers.AssetID
Where tblAssets.AssetID Not In (Select tblUsersInGroup.AssetID
From tblUsersInGroup
Where tblUsersInGroup.Groupname Like 'Admin%' And
tblUsersInGroup.Username Like 'Service Desk%') And
tblADComputers.OU Like '%OU1%' And tblComputersystem.Domainrole < 2 And
tblUsersInGroup.Accounttype = 1
Order By tblAssets.AssetName
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now