Solved

Export Mailbox to PST

Posted on 2014-04-02
10
723 Views
Last Modified: 2014-04-02
I need help with a Powershell script.
I have Exchange Server 2007 sp3. with 30+ mailboxes.
I have installed the Exchange Tools on a Windows 7 32-bit workstation.
I would like to export select single mailboxes to pst files and need to include all folders and subfolders.
Separately I would like to export select single mailboxes to pst files, including all folders and subfolders by date range for archival purposes.
0
Comment
Question by:Frank_Day
10 Comments
 
LVL 25

Accepted Solution

by:
-MAS earned 500 total points
ID: 39972030
Export-Mailbox –Identity <mailboxUser> -PSTFolderPath <pathToSavePST>

e.g. Export-Mailbox –Identity John -PSTFolderPath D:\PSTs
John is the alias of the mailbox and the D:\PSTs is the folder path

Pleae check this
0
 

Author Comment

by:Frank_Day
ID: 39972046
I did that and it gave me an empty pst file.... something like 257k
The mailbox is over 3Gb.
Here is the way I typed it.
Export-Mailbox -Identity bwelborn -PSTFolderPath c:\temp

Question - By default, does this get all folders and subfolders?
0
 
LVL 25

Expert Comment

by:-MAS
ID: 39972048
First of all your error look like account using to export doesn't have full permission of the mailboxes/databases

yes by default it will give you full mailbox as PST
if you want to export only particular date please check this

Please read this as well as it is similar to your case


Please read this as this will help you to set the permission
0
 
LVL 2

Expert Comment

by:aishwarya1412
ID: 39972109
Create a text file Aliases.txt with the list of users

Then use following script

$users = get-content "C:\PST\Aliases.txt"

foreach ($mailbox in $users)
{

New-MailboxExportRequest -Mailbox $mailbox -FilePath "\\file location\$mailbox Mailbox.pst"
}

Make sure you have enough permissions on the mailboxes
0
 
LVL 2

Expert Comment

by:YoursJitu
ID: 39972130
0
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 

Author Comment

by:Frank_Day
ID: 39972346
This is the error that I'm getting....

[PS] C:\>Export-Mailbox -Identity bwelborn -PSTFolderPath c:\temp

Confirm
Are you sure you want to perform this action?
Exporting mailbox content from the mailbox 'Briann Welborn' into .pst file
'c:\temp\bwelborn.pst'. This operation may take a long time to complete.
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help
(default is "Y"):y
Export-Mailbox : Error was found for Briann Welborn (bwelborn@clipperpetroleum.
com) because: Error occurred in the step: Moving messages. Failed to copy messa
ges to the destination mailbox store with error:
MAPI or an unspecified service provider.
ID no: 00000000-0000-00000000, error code: -1056749164
At line:1 char:15
+ Export-Mailbox <<<<  -Identity bwelborn -PSTFolderPath c:\temp
    + CategoryInfo          : InvalidOperation: (0:Int32) [Export-Mailbox], Re
   cipientTaskException
    + FullyQualifiedErrorId : 9E2A3E77,Microsoft.Exchange.Management.Recipient
   Tasks.ExportMailbox



Identity                         : clipper.com/Users Main Office/Briann Welborn
DistinguishedName                : CN=Briann Welborn,OU=Users Main Office,DC=cl
                                   ipper,DC=com
DisplayName                      : Briann Welborn
Alias                            : bwelborn
LegacyExchangeDN                 : /o=Clipper Petroleum/ou=First Administrative
                                    Group/cn=Recipients/cn=bwelborn
PrimarySmtpAddress               : bwelborn@clipperpetroleum.com
SourceServer                     : CPI-EXCH.clipper.com
SourceDatabase                   : CPI-EXCH\First Storage Group\Mailbox Databas
                                   e
SourceGlobalCatalog              : CPI-SRVR
SourceDomainController           :
TargetGlobalCatalog              : CPI-SRVR
TargetDomainController           :
TargetMailbox                    :
TargetServer                     :
TargetDatabase                   :
MailboxSize                      : 3113641KB
IsResourceMailbox                : False
SIDUsedInMatch                   :
SMTPProxies                      :
SourceManager                    :
SourceDirectReports              :
SourcePublicDelegates            :
SourcePublicDelegatesBL          :
SourceAltRecipient               :
SourceAltRecipientBL             :
SourceDeliverAndRedirect         :
MatchedTargetNTAccountDN         :
IsMatchedNTAccountMailboxEnabled :
MatchedContactsDNList            :
TargetNTAccountDNToCreate        :
TargetManager                    :
TargetDirectReports              :
TargetPublicDelegates            :
TargetPublicDelegatesBL          :
TargetAltRecipient               :
TargetAltRecipientBL             :
TargetDeliverAndRedirect         :
Options                          : Default
SourceForestCredential           :
TargetForestCredential           :
TargetFolder                     :
PSTFilePath                      : c:\temp\bwelborn.pst
RsgMailboxGuid                   :
RsgMailboxLegacyExchangeDN       :
RsgMailboxDisplayName            :
RsgDatabaseGuid                  :
StandardMessagesDeleted          : 0
AssociatedMessagesDeleted        : 0
DumpsterMessagesDeleted          : 0
MoveType                         : ExportToPST
MoveStage                        : Move
StartTime                        : 4/2/2014 10:21:04 AM
EndTime                          : 4/2/2014 10:21:05 AM
StatusCode                       : -1056749164
StatusMessage                    : Error occurred in the step: Moving messages.
                                    Failed to copy messages to the destination
                                   mailbox store with error:
                                   MAPI or an unspecified service provider.
                                   ID no: 00000000-0000-00000000
ReportFile                       : C:\Program Files\Microsoft\Exchange Server\L
                                   ogging\MigrationLogs\export-Mailbox20140402-
                                   102039-6977541.xml
0
 
LVL 25

Assisted Solution

by:-MAS
-MAS earned 500 total points
ID: 39972356
Get-MailboxDatabase -identity "PCBOX\First Storage Group\Mailbox Database" | Add-ADPermission -user "DOM1\PSTAdmin" -ExtendedRights Receive-As

Give a user full permission using the above command and try with that user.
0
 

Author Comment

by:Frank_Day
ID: 39972413
OK... gave the administrator account permissions. (I assumed the administrator account had permission by default.  Guess not)
It seems to be working now... will update when it completes.

Question:  Does the 2Gb limit no longer apply to pst files?

Question:  What would the correct syntax be to do the same thing with a date range?  ie... all folders and subfolders with information from January 1 2013 - December 31 2013?

Question:  Does this HAVE to be done from a workstation 32-bit?  OR can it be done from the Exchange Server too?
0
 

Author Comment

by:Frank_Day
ID: 39972473
UpDate:  That worked.

Just curious about my other questions though.

Question:  Does the 2Gb limit no longer apply to pst files?

Question:  What would the correct syntax be to do the same thing with a date range?  ie... all folders and subfolders with information from January 1 2013 - December 31 2013?

Question:  Does this HAVE to be done from a workstation 32-bit?  OR can it be done from the Exchange Server too?
0
 
LVL 25

Expert Comment

by:-MAS
ID: 39972638
Question:  Does the 2Gb limit no longer apply to pst files?
No.
One of my client is exporting his usermailboxes and all are more than 2-3 GB size

Question:  What would the correct syntax be to do the same thing with a date range?  ie... all folders and subfolders with information from January 1 2013 - December 31 2013?
You can see the syntax in the link provided


Question:  Does this HAVE to be done from a workstation 32-bit?  OR can it be done from the Exchange Server too?
Only supports from Exchange 2007 32bit. i,e cannot be exported from server directly
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Follow this checklist to learn more about the 15 things you should never include in an email signature from personal quotes, animated gifs and out-of-date marketing content.
Marketers need statistics and metrics like everybody else needs oxygen. In this article we explain how to enable marketing campaign statistics for Microsoft Exchange mail.
The basic steps you have just learned will be implemented in this video. The basic steps are shown to configure an Exchange DAG in a live working Exchange Server Environment and manage the same (Exchange Server 2010 Software is used in a Windows Ser…
This video discusses moving either the default database or any database to a new volume.

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now