Notification

Icon
Error

AD Users to Managers and their devices. - List Users to Managers and their devices.

Posted: Friday, January 17, 2020 1:45:52 PM(UTC)
C&C

C&C

Member Original PosterPosts: 7
0
Like
Help please,

I need a report that when I filter by the manager shows all staff that are managed by the manager.
along with this I want it to show the devices that are associated to the staff member.
I have managed to produce Staff to managers and then tried adding the devices but it does not work correctly.

Any help will be appreciated.

Code:

Select Top 1000000 tblADusers.Username As [User LID],
tblADusers.Displayname,
tblADusers.email As Email,
tsysIPLocations.IPLocation As [Building Location],
tblAssets.AssetName,
tblAssets.AssetID,
tblAssetCustom.Model,
tblAssets.Lastseen,
tblADObjects.sAMAccountName As [Manager LID],
Manager.Displayname As [Manager Name],
Manager.email As [Manager email]
From tblADusers
Left Join tblADObjects On
tblADObjects.ADObjectID = tblADusers.ManagerADObjectId
Inner Join tblADusers Manager On tblADObjects.ADObjectID = Manager.ADObjectID
Left Join tblAssets On tblAssets.Username = tblADusers.Username And
tblAssets.Userdomain = tblADusers.Userdomain
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysIPLocations On tsysIPLocations.LocationID =
tblAssets.LocationID

Active Discussions

Lansweeper Changes in the licensing model
by  BullGates   Go to last post Go to first unread
Last post: Today at 7:30:32 PM(UTC)
Lansweeper About Memory Changes
by  fjca  
Go to last post Go to first unread
Last post: Today at 5:51:17 PM(UTC)
Lansweeper Wildcard in file scanning to get all files in a directory?
by  RKCar   Go to last post Go to first unread
Last post: Today at 4:03:43 PM(UTC)
Lansweeper Wishlist is dead, no responses from LS staff.
by  RobertB  
Go to last post Go to first unread
Last post: Today at 3:08:12 PM(UTC)
Lansweeper Deploy installer packages not working any more
by  richv   Go to last post Go to first unread
Last post: Today at 3:06:19 PM(UTC)
Lansweeper File Scanning
by  RKCar  
Go to last post Go to first unread
Last post: Today at 2:22:54 PM(UTC)
Lansweeper HP Warranty scan - broken for some products
by  zaty   Go to last post Go to first unread
Last post: Today at 1:52:38 PM(UTC)
Lansweeper How to stop deployments ?
by  Leandro Martins  
Go to last post Go to first unread
Last post: Today at 1:47:22 PM(UTC)