====== List Exchange Users with PowerShell ======
Get-mailbox -ResultSize "unlimited" | select Name, PrimarySmtpAddress
===== List E-Mail Addresses and Aliases =====
https://enterpriseit.co/microsoft-exchange/export-list-of-all-exchange-email-addresses-and-aliases/
CSV:
Get-Mailbox -ResultSize Unlimited -OrganizationalUnit "OU=Phoenix Users,OU=Phoenix,DC=CONTOSO,DC=COM" |Select-Object DisplayName,PrimarySmtpAddress, @{Name="EmailAddresses";Expression={$_.EmailAddresses |Where-Object {$_.PrefixString -ceq "smtp"} | ForEach-Object {$_.SmtpAddress}}} | Export-CSV c:\exportsmtp.csv -NoTypeInformation
Text:
ldifde -f c:\emailaddresses.txt -d "dc=contoso,dc=com" -l proxyaddresses -r "(proxyaddresses=*smtp:*@*)"