Forum Discussion
Gianni88
Nov 20, 2019Copper Contributor
PowerShell command to export user's manager name
Dear all, I would like to know what is the powershell command to get this information : First Name Last Name Email address JobTitle Manager report Name ...
- Dec 03, 2019
Hi Gianni88
it is normal you can't find the Manager field.
The foreach make the work for you, expanding manager property 🙂
Please, debug your scripts in ISE or using output messages 🙂
Cheers,Federico
Dec 03, 2019
Hi Gianni88
it is normal you can't find the Manager field.
The foreach make the work for you, expanding manager property 🙂
Please, debug your scripts in ISE or using output messages 🙂
Cheers,
Federico
Gianni88
Dec 03, 2019Copper Contributor
- Gianni88Dec 03, 2019Copper Contributor
Found this powershell command also, it can help :
Get-ADUser -Filter * -SearchBase 'OU=xxxx,OU=xxxxxx,DC=xxx' -Properties Manager, Title |
Select-Object -Property Name, Title, @{label='Manager';expression={$_.manager -replace '^CN=|,.*$'}}It works perfectly