>NULL: Create a CSV of AD users and their managers

Thursday, 25 July 2019

Create a CSV of AD users and their managers

Run the following in PowerShell changing the path at the end to suit your needs, the output can then be sorted by the Manager column in Excel.

get-aduser -Filter * -Properties Manager | Select-Object Name,sAMAccountName,Manager | export-csv C:\Scripts\UsersWithManagers.csv -notypeinformation

No comments:

Post a Comment