Solved

Export Mailbox to PST

Posted on 2014-04-02
10
746 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
10 Comments
 
LVL 26

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 26

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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 2

Expert Comment

by:Aish
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 26

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 26

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

Turn Insights into Action

Communication across every corner of your business is essential to increase the velocity of your application delivery and support pipeline. Automate, standardize, and contextualize your communication processes with xMatters.

Question has a verified solution.

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

As cyber crime continues to grow in both numbers and sophistication, a troubling trend of optimization has emerged over the last year.
This article will help to fix the below errors for MS Exchange Server 2013 I. Certificate error "name on the security certificate is invalid or does not match the name of the site" II. Out of Office not working III. Make Internal URLs and Externa…
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…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

695 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