Get Manager Details for each AD User

by Robert Allen

In this post, you will learn how to get the Manager details for accounts in Active Directory.

To get a list of Active Directory users that have a manager assigned to their account run the below PowerShell command.

Get-ADUser -LDAPFilter "(manager=*)" -Properties * | select samaccountname,givenname,surname,manager 

This command uses an LDAPFilter to find accounts where the manager attribute is not blank on the account.

get aduser with manager via powershell

To list accounts that do not have a manager assigned use the following command.

Get-ADUser -LDAPFilter "(!manager=*)" -Properties * | select samaccountname,givenname,surname,manager

This command will list accounts where the manager attribute is blank. The blank manager attribute is found by using the “(!manager=*)” LDAPFilter.

get adusers without a manager

To list the manager details for all enabled accounts, use this command. This command will list the manager attribute for all enabled accounts.

Get-ADUser -Filter {Enabled -eq $true} -properties manager | select samaccountname, manager
enabled users with a manager

List AD Manager Name with the AD Pro Toolkit

The AD Pro Toolkit includes an easy-to-use AD Reporting Tool that includes over 200 reports.

Click on “User Reports” and select from the 3 manager reports (With manager, without manager, Users that are a manager).

ad user manager report

Click “Run” to generate the report. You can click the “Browse” button to run the report for a specific OU or group.

user manager report

To get a summary of accounts that are a manager and the number of direct reports run the “Users that are a manager” report.

users with direct reports

In the screenshot above, you can see the user “Robert.Allen” is a manager for 350 accounts.

You can customize these reports by clicking the “Columns” button and adding and remove user attributes. For example, I’ll add the department, company, lastLogonTimestamp and OU to this report.

modify manager report

Re-run the report to get the additional details for each account.

customize ad manager report example

As you can see the AD Reporting Tool makes it very easy to generate a list of users and their manager details. You can also schedule these reports and send automatic emails with the built in scheduler.

Try AD Report Tool (14-Day Free Trial)

Conclusion

In this post, I showed you two options for getting Active Directory users and their manager details. With PowerShell you can use the Get-ADUser -LDAPFilter command to list users with or without a manager. As an alternative to PowerShell, the AD Reporting Tool makes it very easy to generate reports on your Active Directory accounts.

Leave a Comment