Solved

Export Mailbox to PST

Posted on 2014-04-02
10
720 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 24

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 24

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
Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

 

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 24

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 24

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

Shouldn't all users have the same email signature?

You wouldn't let your users design their own business cards, would you? So, why do you let them design their own email signatures? Think of the damage they could be doing to your brand reputation! Choose the easy way to manage set up and add email signatures for all users.

Join & Write a Comment

This article explains in simple steps how to renew expiring Exchange Server Internal Transport Certificate.
Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
This tutorial will give a an overview on how to deploy remote agents in Backup Exec 2012 to new servers. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as connecting to a remote Back…
This tutorial will show how to configure a new Backup Exec 2012 server and move an existing database to that server with the use of the BEUtility. Install Backup Exec 2012 on the new server and apply all of the latest hotfixes and service packs. The…

705 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

20 Experts available now in Live!

Get 1:1 Help Now