skip to Main Content

Export a list of mailboxes to text in Exchange

You need to export a list of mailboxes to a text file in Exchange Server. Such a list can be important. For example, there is a mailbox migration coming. With that list, you can get more information about the mailboxes of the users. In this article, you will learn how to do it through PowerShell.

Export a list of mailboxes to text through PowerShell

The information you need to export is display name, user account and email address. Before you start the export to a text file, you can make use of the Out-GridView cmdlet. This cmdlet will give you the results without exporting. I recommend doing that first. Let’s see it in action.

Run Exchange Management Shell as administrator. Make use of the command Resultsize 10. The output will list only 10 users. It will generate faster without a load on the server.

Export a list of mailboxes to text in Exchange out-gridview

You can sort the output on email address. Run the following command.

Now that you can confirm that the information is correct. You can change the command to Resultsize Unlimited. Run the following command.

If all is looking great, let’s export the information to a text file. First make sure that you have a folder created on your C: drive with the name output. The path in Windows Explorer should show as C:\output\.

Text file export is complete.

Result exported list of mailboxes to text file

Go to the path c:\output\display_sam_smtp.txt

Open the text file with your favorite application. I opened the text file with Notepad.

Export a list of mailboxes to text in Exchange open text file

The text file is showing the information you need.


In this article, you learned how to export a list of mailboxes to text in Exchange. Use the Out-GridView cmdlet before exporting it to a text file. Did you use the PowerShell command to export a list of mailboxes to text in Exchange? If you enjoyed this article, you may also like Export a list of mailboxes to CSV in Exchange. Don’t forget to follow us and share this article.



ALI TAJRAN is a passionate IT Architect and IT Consultant. His specialism is designing and building complex enterprise environments. He started Information Technology at a very young age, and his goal is to teach and inspire others. Connect with ALI TAJRAN on social media. Read more »

This Post Has 0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Back To Top