Export mailboxes to PST one by one in Exchange2007 and 2010

Published on
10,365 Points
7 Endorsements
Last Modified:
Exchange Server, Windows Server, Active Directory, Virtualization, Skype for Business Expert.
Export mailboxes to PST in bulk
Most of the administrators run bulk export of mailboxes to PST using the command 
foreach ($i in (Get-Mailbox)) { New-MailboxExportRequest -Mailbox $i -FilePath "\\UNCPATH\$($i.Alias).pst"}

Open in new window

If your server resources not sufficient to do the export your server may restart automatically. As a workaround below mentioned commands will help you to export to PST without exchange server service restart/outage by doing a mailbox export one by one.
Export mailboxes one by one to same folder
This command will check every 3 minutes that current export request is completed or no.  You can change the value based on your mailbox sizes.
It will export to \\Backupserver\PSTs as PSTs with alias as the file name. Example a user with alias jsmith it will be exported to \\Backupserver\PSTs as jsmith.pst
Below command  will export one mailbox at a time. It will check every 3 minutes 

foreach ($i in (Get-Mailbox)) { New-MailboxExportRequest -Mailbox $i -FilePath "\\Backupserver\PSTs\$($i.Alias).pst" -baditemlimit 50 -acceptlargedataloss ;while ((Get-MailboxExportRequest -mailbox $i | ? {$_.Status -eq “Queued” -or $_.Status -eq “InProgress”})) { sleep 180 } }

Open in new window

Export malboxes one by one to different folders
If you want to export to multiple folders. For example if you  have 3 users with these alias jsmith, Joe and James. You can export to same as below. 
Below command  will export one mailbox at a time and will export to the corresponding folders.
foreach ($i in (Get-Mailbox)) { New-MailboxExportRequest -Mailbox $i -FilePath "\\Backupserver\PSTs\$($i.Alias)\$($i.Alias).pst" -baditemlimit 50 -acceptlargedataloss ;while ((Get-MailboxExportRequest -mailbox $i | ? {$_.Status -eq “Queued” -or $_.Status -eq “InProgress”})) { sleep 180 } }

Open in new window

Hope it helps.
Author:MAS (MVE)
  • 4
LVL 29

Author Comment

by:MAS (MVE)
LVL 29

Author Comment

by:MAS (MVE)
Hi Ericpete,
The article in socialTechnet is published by me. You can check who published it.
I am more interested in EE than Social Technet. What ever I publish in Social Technet I will have a copy here and vice-versa.
This is another example.TechnetWiki  EE
 You can compare my contributions in EE and in Social Technet. Contributions in EE much much more compare to SocialTechnet.

Regarding number of words. I will rewrite and let you know.
LVL 29

Author Comment

by:MAS (MVE)
It is already enabled.

Expert Comment

by:Akash Bansal
How to bookmark this
LVL 29

Author Comment

by:MAS (MVE)
Are you talking about bookmarking in your PC ?
If yes please check these

if you want to add to bookmark in your profile in Experts-Exchange database please click "Add to Personal Knowledgebase"

Featured Post

Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

Join & Write a Comment

This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month