Exchange Shell – Get all shared mailboxes with primary SMTP

Exchange 2013 1

We recently received a request to provide a project manager with a full list of all shared mailboxes with their primary SMTP addresses that were in Microsoft Exchange.

To do this is a pretty straight forward task using Exchange Management Shell (EMS).

Just go ahead and open your EMS and run the following command:

Get-Mailbox -RecipientTypeDetails SharedMailbox -ResultSize:Unlimited | Select Identity,Alias,DisplayName,primarysmtpaddress | sort displayname

This will go through your Exchange environment and give you a list of all shared mailboxes, their name and the primary SMTP address for each Shared Mailbox.

If you want to export this information to CSV, use the command below:

Get-Mailbox -RecipientTypeDetails SharedMailbox -ResultSize:Unlimited | Select Identity,Alias,DisplayName,primarysmtpaddress | sort displayname | export-CSV C:\TGH\sharedmailboxes.csv

where:

  • C:\TGH\sharedmailboxes.csv = the filepath where you want to save your CSV file

This will then export all the information into a CSV file where you specified in your command line.

Feedback

If you have any questions or feedback on this guide, please feel free to leave us a message below in our comments section and we will get back to you as soon as we can.

Free Subscription!Subscribe to our site to receive updates via email!

Enter your email address below and click the Subscribe button to receive email notifications about new and exciting downloads available through our website at https://www.techygeekshome.com

You will also receive notifications about new technical guides, latest news and MSI installer downloads that are available through our blog here at https://blog.techygeekshome.info 

We will not spam you and we will not pass on any of your details to anyone else. We tend to post new content once or twice a week.

Join 233 other subscribers

You can unsubscribe any time you like.

Summary
Exchange Shell - Get all shared mailboxes with primary SMTP
Article Name
Exchange Shell - Get all shared mailboxes with primary SMTP
Description
Get all Exchange shared mailboxes with primary SMTP addresses.
Author
Publisher Name
TechyGeeksHome
Publisher Logo

About A.J. Armstrong

Founder of TechyGeeksHome and Head Editor for over eight years! IT expert in multiple areas for over 20 years. Sharing experience and knowledge whenever possible! Making IT Happen.

View all posts by A.J. Armstrong