‎01-16-2017 11:08 AM
Select Top 1000000 tblADusers.Username,
tblADusers.Userdomain,
tblADusers.Firstname,
tblADusers.Lastname,
tblADusers.Name,
tblADusers.Displayname,
tblADusers.email,
tblADGroups.Name As ADGroupName,
tblADGroups.Description As ADGroupDescription,
tblAssets.Username As Username1,
tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Userdomain As Userdomain1,
tblAssets.Lastseen
From tblADMembership
Left Join tblADGroups On tblADMembership.ParentAdObjectID =
tblADGroups.ADObjectID
Right Join tblADusers On tblADMembership.ChildAdObjectID =
tblADusers.ADObjectID
Inner Join tblAssets On tblAssets.Username = tblADusers.Username And
tblAssets.Userdomain = tblADusers.Userdomain
Where tblADGroups.Name = 'localITUsers'
Order By tblADusers.Userdomain,
tblADusers.Username,
ADGroupName
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now