Get-ADUser -Filter {Description -eq "Slav"} -SearchBase 'ou=users,ou=OU1,dc=contoso,dc=com' -Properties proxyaddresses,targetaddress,description |
select name,description,targetaddress, @{L='ProxyAddress_1'; E={$_.proxyaddresses[0]}},
@{L='ProxyAddress_2';E={$_.ProxyAddresses[1]}},@{L='ProxyAddress_3';E={$_.ProxyAddresses[2]}},@{L='ProxyAddress_4';E={$_.ProxyAddresses[3]}} |
Export-Csv -Path c:\tmp\proxyadresses.csv -NoTypeInformation