Solved

Export Mailbox to PST

Posted on 2014-04-02
10
732 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
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 
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
 

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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Read this checklist to learn more about the 15 things you should never include in an email signature.
The new Gmail Phishing Scam going around is surprising even the savviest of users with its sophisticated techniques.
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

791 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