We can use the below exchange cmdlet to pull the details of email addresses. Then export it to the CSV file using Export-CSV cmdlet.
Get-Mailbox -resultsize unlimited | Select Name, @{Name=’EmailAddresses’;Expression={[string]::join(";", ($_.EmailAddresses))}} | Export-CSV EmailAddress.csv
Get-Mailbox -resultsize unlimited | Select Name, @{Name=’EmailAddresses’;Expression={[string]::join(";", ($_.EmailAddresses))}} | Export-CSV EmailAddress.csv
No comments:
Post a Comment