<

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x

Export mailboxes to PST one by one in Exchange2007 and 2010

Published on
11,509 Points
2,309 Views
7 Endorsements
Last Modified:
MAS
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. 
\\Backupserver\PSTs\jsmith\jsmith.pst
\\Backupserver\PSTs\joe\Joe.pst
\\Backupserver\PSTs\james\james.pst
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.
7
Comment
Author:MAS
  • 5
7 Comments
LVL 31

Author Comment

by:MAS
Awaiting
0
LVL 31

Author Comment

by:MAS
Hi Ericpete,
The article in socialTechnet is published by me. You can check who published it.
http://social.technet.microsoft.com/wiki/contents/articles/26771.export-mailboxes-to-pst-one-by-one-in-exchange2007-and-2010.aspx
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.
0
LVL 31

Author Comment

by:MAS
It is already enabled.
0
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

LVL 2

Expert Comment

by:Akash Bansal
How to bookmark this
0
LVL 31

Author Comment

by:MAS
Are you talking about bookmarking in your PC ?
If yes please check these
http://windows.microsoft.com/en-us/internet-explorer/add-view-organize-favorites#ie=ie-10
http://www.computerhope.com/issues/ch000858.htm

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

Expert Comment

by:Senior IT System Engineer
Hi MAS,

Must the PowerShell script be executed on the server with Outlook installed or it can be executed on the Laptop with PowerShell remoting running?

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://ExchangeServer/Powershell/ -Authentication Kerberos
Import-PSSession $Session

Open in new window

0
LVL 31

Author Comment

by:MAS
@Senior IT System Engineer
From Exchange2010 onwards Outlook binaries are included in server.
1

Featured Post

Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

Join & Write a Comment

This video discusses moving either the default database or any database to a new volume.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month