A colleague put an information in the otherPager property of our active directory. I must retrieve this information. Im am using this code
Import-Module ActiveDirectory
Get-ADUSER -Filter * -properties otherPager | Select-Object -Property Name, Surname, UserPrincipalName, {$_.otherPager}[0] | Sort-Object Name | Export-Csv -Path "\\srv-qlik\e\Datawarehouse\autres sources\Gestion des droits\Active_directory_users.csv" -Encoding Default -NoTypeInformation
otherPager property outputs as Microsoft.ActiveDirectory.Management.ADPropertyValueCollection in the csv. This is not what I expected.
I search other the internet and found out otherPager property consists in an array, but no information on how to access its elements. In fact i'd just need the first element of this array.
Can you help ?