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 Report on clients with no LSAgent
by  RobertB   Go to last post Go to first unread
Last post: Yesterday at 6:55:32 PM(UTC)
Lansweeper Lansweeper report to match computer name
by  RC62N   Go to last post Go to first unread
Last post: 2/19/2020 5:02:27 PM(UTC)
Lansweeper Distinct user logins per PC
by  Bruce Garoutte   Go to last post Go to first unread
Last post: 2/17/2020 6:36:29 PM(UTC)
Lansweeper Software version report issue
by  RC62N  
Go to last post Go to first unread
Last post: 2/17/2020 4:07:20 PM(UTC)
Lansweeper Patch Tuesday - Exclude Win 2008 & Win7
by  doone128   Go to last post Go to first unread
Last post: 2/17/2020 1:34:36 PM(UTC)
Lansweeper Performance statistics combined into one report
by  djs1789  
Go to last post Go to first unread
Last post: 2/15/2020 1:50:32 AM(UTC)