This is a pretty common ask so here is a quick blog post on how to get a User’s manager or a Manager’s reports using SMLets.
A users manger is a relationship between the user object and the manager’s user object.
The Relationship type name is: UserManagesUser. This is what the data model looks like in the Visio diagram.
To get the user’s manager you do this:
To get a manager’s reports you do this:
Note: I used the same Get-SCSMObject cmdlet as above to set $Omar by passing Omar’s username in the filter criteria.