> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.accessorange.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Description:

Articles on: [Scripts](/en/category/scripts-if12k0/)

## Description:

  
  
This script is used to get CSV file which contain all the user in the On-Prem AD and their Manager  
  

## Script:

  
  
import-module activedirectory   
  
Get-ADUser -Filter -Properties | Select name, @{n='Manager';e={(Get-ADUser $_.manager).name}} | export-csv "c:\export.csv" -NoTypeInformation

Updated on: 31/01/2023