Exchange- gets the master and all SMTP addresses
In Exchange operation and maintenance, it is sometimes necessary to export the user's primary and all SMTP addresses
Use the Get-Mailbox command to get all the information of the mailbox. The figure below is the field of the SMTP address.
Get-Mailbox-Identity XXX | select PrimarySmtpAddress,EmailAddresses
View all primary, all SMTP addresses
Due to the window limit, only the last three items are displayed.
Get-Mailbox-ResultSize unlimited | select name,PrimarySmtpAddressGet-Mailbox-ResultSize unlimited | select name,EmailAddresses
Note: if you use Exchange in this console, you need to import AD module in advance and use Import-Module ActiveDirectory.
Get all the imported modules Get-module-list | ft-property name,moduletype-auto