Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Export Mailbox to PST

Posted on 2014-04-02
10
Medium Priority
?
763 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 27

Accepted Solution

by:
MAS earned 1500 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 27

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
Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

 
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 27

Assisted Solution

by:MAS
MAS earned 1500 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 27

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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

Are you looking for the options available for exporting EDB files to PST? You may be confused as they are different in different Exchange versions. Here, I will discuss some options available.
If something goes wrong with Exchange, your IT resources are in trouble.All Exchange server migration processes are not designed to be identical and though migrating email from on-premises Exchange mailbox to Cloud’s Office 365 is relatively simple…
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…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Suggested Courses

609 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