→ 🚀What's New? Join Us for the Fall Product Launch! Register Now !

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Iyad
Engaged Sweeper
Hi,
I need to build a report that shows me, users, from the active directory and their laptops filtered bu AD user OU
please assist
1 REPLY 1
brandon_jones
Champion Sweeper III
Try this and see if it give you the information you need.

Select Top 1000000 tblassets.AssetID,
tblassets.AssetName,
tsysassettypes.AssetTypename,
tsysassettypes.AssetTypeIcon10 As icon,
tblassets.IPAddress,
tblassets.Lastseen,
tblassets.Lasttried,
tblassets.Username,
tblADusers.OU
From tblassets
Inner Join tblassetcustom On tblassets.AssetID = tblassetcustom.AssetID
Inner Join tsysassettypes On tsysassettypes.AssetType = tblassets.Assettype
Inner Join lansweeperdb.dbo.tblADusers On tblassets.Username =
tblADusers.Username
Inner Join lansweeperdb.dbo.tblPortableBattery On tblassets.AssetID =
tblPortableBattery.AssetID
Where tblassetcustom.State = 1 And tblPortableBattery.Win32_PortableBatteryid Is
Not Null
Order By tblADusers.OU

New to Lansweeper?

Try Lansweeper For Free

Experience Lansweeper with your own data.
Sign up now for a 14-day free trial.

Try Now