Solved

how to export mailbox in exchange 2010

Posted on 2013-01-20
71
867 Views
Last Modified: 2013-08-14
Hi,

 I like to know how to:
(1) Export/Import mailbox into/from PST file in Exchange Management Shell.
(2) do imort/Export off the mailbox in Exchange Management Console, I do not see "Export" or "Import" option when I right click on the mailbox.

Thanks.
0
Comment
Question by:sglee
  • 34
  • 26
  • 10
  • +1
71 Comments
 
LVL 18

Expert Comment

by:irweazelwallis
ID: 38798427
you can't do it form the GUI its powershell only

let me just find the guide for that and i will post it up for you
0
 
LVL 18

Accepted Solution

by:
irweazelwallis earned 190 total points
ID: 38798430
0
 
LVL 18

Expert Comment

by:irweazelwallis
ID: 38798435
if you want to tune the amount of requests you can do at once this technet article gives you the places to chance the settings

http://technet.microsoft.com/en-us/library/ff963524(v=exchg.141).aspx

if you need to do more than the default tune the settings up rather than taking a big leap
0
 

Author Comment

by:sglee
ID: 38798475
So far,

New-ManagementRoleAssignment –Role “Mailbox Import Export” –User “john doe”
ran successfully.

But I am not sure about the syntax of the following:
export-malibox -identity -PSTFolderPath c:\  .pst

FYI I created a folder C:\PST off the Exchange Server C Drive and added Exchange Trusted Subsystem account in the Security tab of the folder.
0
 
LVL 18

Expert Comment

by:irweazelwallis
ID: 38798494
you need to run the import and exports form shares i.e. \\server\exportshare
0
 

Author Comment

by:sglee
ID: 38798498
"you need to run the import and exports form shares i.e. \\server\exportshare " ---> I don't understand. Can you give me a complete syntax as to the command that I need to run in Exch Mgmt Shell?
0
 
LVL 18

Assisted Solution

by:irweazelwallis
irweazelwallis earned 190 total points
ID: 38798509
New-MailboxExportRequest -Mailbox "john Smith" -FilePath "\\SERVER01\PSTFileShare\smith.pst"


you cant run the export to a local file path i.e. C:\ d:\
. But You can share the folder that you are writing to and access it that way
0
 
LVL 18

Assisted Solution

by:irweazelwallis
irweazelwallis earned 190 total points
ID: 38798518
the while its running you can keep an eye on its progress

Get-MailboxExportRequest  | Get-MailboxExportRequestStatistics

or

Get-MailboxExportRequest  Where {$_.Status -ne "completed"| Get-MailboxExportRequestStatistics
0
 

Author Comment

by:sglee
ID: 38798523
When I run "New-MailboxExportRequest -Mailbox "john Smith" -FilePath "\\Server1\PST\john Smiths.pst",

The term 'New-MailboxExportRequest' is not recognized as the name of a cmdlet, function, script file, or operable prog
am. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:25
+ New-MailboxExportRequest <<<<  -Mailbox "john Smith" -FilePath "\\Server1\PST\johnSmiths.pst"
    + CategoryInfo          : ObjectNotFound: (New-MailboxExportRequest:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
0
 
LVL 52

Assisted Solution

by:Manpreet SIngh Khatra
Manpreet SIngh Khatra earned 75 total points
ID: 38798531
Export-Mailbox -Identity "john Smith" -FilePath "\\Server1\PST\john Smiths.pst"

- Rancy
0
 
LVL 18

Expert Comment

by:irweazelwallis
ID: 38798544
what version of exchange 2010 are you running
export-mailbox should be an older version of the cmdlet

try and as rancy suggests
0
 

Author Comment

by:sglee
ID: 38798555
When I ran:

Export-Mailbox -Identity "john Smith" -FilePath "\\Server1\PST\john Smiths.pst"

I get an error again:

The term 'Export-Mailbox' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
the spelling of the name, or if a path was included, verify that the path is correct and try again.

Exch 2010 Version: 14.01.0438.000
0
 
LVL 52

Expert Comment

by:Manpreet SIngh Khatra
ID: 38798556
What is the version of Exchange ?
I guess your Account doesnt has rights to run the Export command

- Rancy
0
 

Author Comment

by:sglee
ID: 38798564
Exch 2010 Version: 14.01.0438.000

I even opened Exch Mgmt Shell as Administrator, bu I am getting the same error.
0
 
LVL 18

Assisted Solution

by:irweazelwallis
irweazelwallis earned 190 total points
ID: 38798567
you need to be on at least sp1 to be able to do this


check and make sure you have got the right roles assigned to you account

http://www.petri.co.il/rbac-in-exchange-2010.htm - look at the bottom part of this and its screenshots through checking them
0
 

Author Comment

by:sglee
ID: 38798577
Let me apply SP1, restart the server  and try the commands again.
0
 
LVL 52

Expert Comment

by:Manpreet SIngh Khatra
ID: 38798579
irweazelwallis: 14.01 means SP and above :)

Please check for the role and hope you added your account to the RBAC role to run the Export command ?

- Rancy
0
 
LVL 18

Assisted Solution

by:irweazelwallis
irweazelwallis earned 190 total points
ID: 38798580
its probably that its permissions.

make sure you have restarted the command shell

or even log off and on again
0
 

Author Comment

by:sglee
ID: 38798590
Can you explain "Please check for the role and hope you added your account to the RBAC role to run the Export command ?"?

"
0
 
LVL 18

Expert Comment

by:irweazelwallis
ID: 38798594
have a look at the link i posted - scroll down to the section "Delegating Predefined Roles"


it shows you where you can view the role assignments and you can check to make sure the users you are logged on as has the mailbox export and import roles
0
 
LVL 52

Assisted Solution

by:Manpreet SIngh Khatra
Manpreet SIngh Khatra earned 75 total points
ID: 38798601
Get-ManagementRoleAssignment –Role “Mailbox Import Export” | FL

- Rancy
0
 

Author Comment

by:sglee
ID: 38798650
I have already ran New-ManagementRoleAssignment –Role “Mailbox Import Export” –User “john smiths”
0
 

Author Comment

by:sglee
ID: 38798687
@Rancy
What version of Exch 2010 do I have?
I have downloaded SP2. Should I apply it?
0
 
LVL 52

Expert Comment

by:Manpreet SIngh Khatra
ID: 38798696
Yes you can apply ... ensure Exchange DB and System state backup

- Rancy
0
 
LVL 18

Expert Comment

by:irweazelwallis
ID: 38798737
do you have a single server? Make sure if you have more than one you work your way round start with the CAS server

you are on SP1 i tihnk with RU8 on there
0
 

Author Comment

by:sglee
ID: 38798787
if I have SP1, should I able to run these commands without a problem?
0
 
LVL 18

Expert Comment

by:irweazelwallis
ID: 38798849
yes, fairly sure SP1 should enable all of it.
 
The error you are getting is normally permissions based.

If you don't have at least SP2 on then you are a fair bit behind on patching
Once you go to SP2 the command to run should be the new-mailboxexportrequest
0
 

Author Comment

by:sglee
ID: 38798895
I applied SP2 and restarted the server. Now EXCH 2010 Version is 14.02.0247.005

In Exch Mgmt Shell, I ran:

New-ManagementRoleAssignment –Role “Mailbox Import Export” –User “John Smiths”
---> ran successfully

I tried both commands, but failed with the same message:
(1) Export-Mailbox -Identity "John Smiths" -FilePath "\\Server1\PST\johnSmiths.pst"
(2) New-MailboxExportRequest -Mailbox "John Smiths" -FilePath "\\Server1\PST\John Smiths.pst"

But both resulted in errors: The term 'New-MailboxExportRequest' or 'Export-Mailbox' is not recognized as the name of a cmdlet....

I have two questions:
a) What is the difference between (1) and (2) commands
b)  Why am I having so much trouble with this?
c) Why one command works and two other commands fail?
0
 

Author Comment

by:sglee
ID: 38799024
Exchange Active Sync PropertiesI have a problem.
After applying SP2, smartphone users are complaining that they can't get emails or the phone is asking for security password or in my case, it shows "incorrect username and password" on the phone.

So I opened Exch Mgmt Console/Server Configuration/Client Access. Open Server Properties/Authentication and unchecked the checkbox for "Basic authentication (password in sent in clear text".

But users still can't get their emails on their smartphones. Btw, Outlook is running fine.
0
 
LVL 18

Expert Comment

by:irweazelwallis
ID: 38799113
first question

is the user you are assigning the role to your user account or the user account you are trying to export?


Have you done a full reboot?
do you have any error in the event logs?

to troubleshoot the active sync issue further please use

https://www.testexchangeconnectivity.com/
0
 

Author Comment

by:sglee
ID: 38799121
OWA PropertiesActive Sync Properties
Update:
On the smartphones, I can crate Exch. account w/o a problem. However it failes to retrieve the email with an message "Security Update Required" - Update security settings to use DomainName".
I have two choices [OK] and [Cancel].
When I click OK, then I see the screen "Activate device administrator?".
Server remote.DomainName.com must be able to remotely control some security features on your device" - Erase all data  - Set password rules  - Monitor screen unlock attempts.

and I have two choices at the bottom [Activate] or [Cancel]. If I press [Activate], then I see PIN and Password options highlighted. I assume it is asking me to input password and I don't want to do that.
Before applying SP2, I did not have to create a password for the phone.
0
 

Author Comment

by:sglee
ID: 38799129
I did full reboot twice since SP2 was applied.
I ran https://www.testexchangeconnectivity.com and all passed.

ExRCA is testing Exchange ActiveSync.  
  Exchange ActiveSync was tested successfully.
0
 
LVL 18

Expert Comment

by:irweazelwallis
ID: 38799141
you need to check the active sync policy as that is what is forcing it to prompt for username and password
0
 

Author Comment

by:sglee
ID: 38799151
where do I go to check the policy?
If this is going too long and if I need to open another case for this error, I will. Just let me know.
0
 
LVL 18

Expert Comment

by:irweazelwallis
ID: 38799234
Organisation Container
Client Access
Exchange Active Sync Policies

2nd Tab is named "Password" it will be ticked to say require password
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:sglee
ID: 38799396
That is right. I remember now ...
It was checked and I unchecked the checkbox. But still my smartphone is requiring passcode setup. Do I need to restart something?
0
 

Author Comment

by:sglee
ID: 38799484
I rebooted the server, but my smartphone is still saying:
Security Update Required

Update security settings to use [Exch Account]
0
 

Author Comment

by:sglee
ID: 38799696
It is working now. I had to remove my smartphone profile from Exchange Mgmt Console/Recipient Configuration/Mailbox/My mailbox/Manage Mobile.

But the same problem still exists:

In Exch Mgmt Shell, I ran:

New-ManagementRoleAssignment –Role “Mailbox Import Export” –User “John Smiths”
---> ran successfully

I tried both commands, but failed with the same message:
(1) Export-Mailbox -Identity "John Smiths" -FilePath "\\Server1\PST\johnSmiths.pst"
(2) New-MailboxExportRequest -Mailbox "John Smiths" -FilePath "\\Server1\PST\John Smiths.pst"
0
 

Author Comment

by:sglee
ID: 38799740
I got it this time. I found this article on Internet. It states that I have to run role assignment  and close Mgmt Shell. Re-open before running the New-MailboxExportRequest

Please see below:


http://social.technet.microsoft.com/Forums/en-US/exchangesvrgenerallegacy/thread/cd70c52f-c119-4b8e-a618-c6120c34e5e2

"Just a side note: After you add the role assignment you will first have to exit out of the Exchange Management Shell and then get back in before running the New-MailboxExportRequest.  The cause is that roles are loaded when the Management Shell is loaded - if the rights didn't already exist they will not be loaded and you will receive the error that the cmdlet is not recognized.  Once you exit out and restart the exchange management shell the command should be recognized"
0
 

Author Comment

by:sglee
ID: 38799742
Can I export mailboxes into ANY shared folder on the network or it has to be the shared folder on this Exchange Server?
0
 
LVL 18

Expert Comment

by:irweazelwallis
ID: 38800028
I did ask if you had closed the managwment shell, bit glad it's working now
Yes any folder you have permissions  to
0
 

Author Comment

by:sglee
ID: 38801248
@irweazelwallis

Yes I see your comment "Posted on 2013-01-20 at 07:34:37ID: 38798580". For some reason I overlooked your comment - "make sure you have restarted the command shell".
Sorry about that and thanks for your help.
0
 
LVL 18

Expert Comment

by:irweazelwallis
ID: 38801282
no worries

Are you all working now?
0
 

Author Comment

by:sglee
ID: 38801341
YES.
0
 

Author Comment

by:sglee
ID: 38801461
EMC Import/Export GUI@ irweazelwallis

Reading over the link you posted above ...

http://www.msexchange.org/articles-tutorials/exchange-server-2010/management-administration/exporting-importing-mailboxes-exchange-server-2010.html

if you go down midway, I see the screenshot (embedded above). I thought ther was no GUI  on Import/Export within EMC???
0
 
LVL 18

Expert Comment

by:irweazelwallis
ID: 38801493
i think that screenshot was from a release candidate for exchange 2010.
They changed the functionality before the RTM version.
You won't find that GUI option available in any later version
0
 

Author Comment

by:sglee
ID: 38801511
Got you. Thanks again.
Which ID, do you think, I need to award points to?
0
 

Author Comment

by:sglee
ID: 38801621
if you don't mind answering one more question ...

I picked this up somewhere yesterday. Obvisouly you can backup all the mailboxes in one command:

foreach ($mbx in (Get-Mailbox)) { New-MailboxExportRequest -Mailbox $mbx -FilePath "\\Server1\PST\$($mbx.Alias).pst" }

If this is true, then  how should I change the following role command that is specific to a user?
New-ManagementRoleAssignment –Role “Mailbox Import Export” –User "DomainName\JohnSmiths"
0
 
LVL 18

Expert Comment

by:irweazelwallis
ID: 38801644
not sure i quite understand the question.

You only need to assign that role to the user doing the exporting and not the user whose mailbox is being exported

i.e. John Smith is you admin user - you assign the role to him
you log on as John smith and then run that powershell request on what ever mailboxes you want to export with no further configuration
0
 

Author Comment

by:sglee
ID: 38801676
"You only need to assign that role to the user doing the exporting and not the user whose mailbox is being exported" --->  that cleared my question.
0
 

Author Comment

by:sglee
ID: 38801900
Actually it stopped in the middle of backing up a mailbox. The mailbox size is 3.35GB and it stopped at 1.25GB.
I did not see any error message in EMS.
0
 
LVL 18

Expert Comment

by:irweazelwallis
ID: 38801952
you should be able to see more details by using this

get-mailboxexportrequest | fl

this will give more details

its possible that there are a number of corrupt items in mailboxes are causing the issues

see if you can break it down to which mailbox its failing on and change the bad item limit
0
 
LVL 18

Expert Comment

by:irweazelwallis
ID: 38801960
if you add

-BadItemLimit xx (where xx is a number)

then that should help it get through, but this obviously could skip some data
0
 

Author Comment

by:sglee
ID: 38802336
OK. I added "-BadItemLimit 9" and running it. Let's see what it does.
BTW, is there a way to backup each individual mailbox all at once? I have 20 mailboxes and I don't want to run mailbox export for 20 accounts one at a time if there is a way to do it all automatically.
0
 
LVL 52

Expert Comment

by:Manpreet SIngh Khatra
ID: 38802376
What you said at ...... ID: 38801621 is a perfect way to get it addressed

- Rancy
0
 

Author Comment

by:sglee
ID: 38802413
That worked. I guess the reason this command did not work yesterday was because because I did not close EMC and re-open EMC to run the command.

How do I stop these jobs in the queue?
0
 
LVL 52

Expert Comment

by:Manpreet SIngh Khatra
ID: 38802422
You dont want them to run .... if so hit Ctrl+C

- Rancy
0
 

Author Comment

by:sglee
ID: 38802443
But they are already "Queued" and I am back to command prompt.
0
 
LVL 18

Expert Comment

by:irweazelwallis
ID: 38802448
get-mailboxexportrequest | remove-mailboxexport request


if you want to remove all of them
0
 
LVL 18

Expert Comment

by:irweazelwallis
ID: 38802456
if you want something more specific then you will need to do something like

get-mailboxexportrequest {where -id -eq "xxxxx"} | remove-mailboxexportrequest

i think that should be right

to get the id you will need to run

get-mailboxexportrequest | fl

you can see the details
0
 

Author Comment

by:sglee
ID: 38802602
I See.
Once PST is created once for each mailbox user, next time when export is run, does it create PST from the scratch or add changes only to an existing PST?
0
 
LVL 52

Expert Comment

by:Manpreet SIngh Khatra
ID: 38802766
It will create PST from scratch as it doesnt have any such info to add modification\items

- Rancy
0
 

Author Comment

by:sglee
ID: 38803027
I see.

What is the Import command?
0
 
LVL 18

Expert Comment

by:irweazelwallis
ID: 38803113
New-mailboximportrequest -mailbox xxx -filepath \lservername\sharename.pst
0
 

Author Comment

by:sglee
ID: 38803135
Could it be:
New-mailboximportrequest -mailbox xxx -filepath \\ComputerName\SharedFolderName\JoeSmiths.pst?
0
 
LVL 18

Expert Comment

by:irweazelwallis
ID: 38803170
if you want to run more than the 2 that is probably happening at the moment use the technet article that i posted first

http://technet.microsoft.com/en-us/library/ff963524(v=exchg.141).aspx

these are the two settings that you can up
MaxActiveMovesPerTargetMDB
MaxActiveMovesPerSourceMDB


be careful with the amount you tune them as it can have a negative effect on performance
0
 
LVL 52

Expert Comment

by:Manpreet SIngh Khatra
ID: 38805063
sglee: Yes it could be what your saying and surely if you want article is shared

- Rancy
0
 

Author Comment

by:sglee
ID: 38805257
When I ran - foreach ($mbx in (Get-Mailbox)) { New-MailboxExportRequest -Mailbox $mbx -FilePath "\\Server1\PST\$($mbx.Alias).pst" } command, it exported every single mailbox into PST and it was nice. However so many mailboxes failed in the middle.
But when I export using OUTLOOK on user workstation, I do not get errors and get a complete backup in PST.
What is the difference between doing it in EMS and OUTLOOK?
If there are errors in the mailbox, why one method errors out and another method does not?

Can I run foreach ($mbx in (Get-Mailbox)) { New-MailboxExportRequest -Mailbox $mbx -FilePath "\\Server1\PST\$($mbx.Alias).pst" } command with "-BadItemLimit xx" option?
0
 
LVL 52

Expert Comment

by:Manpreet SIngh Khatra
ID: 38805426
PST from server would fail if there is corruption or Quota issue

What is the difference between doing it in EMS and OUTLOOK? - EMS looks for Corruption and QUota whereas Outlook will only check with local data stored in .ost file

- Rancy
0
 
LVL 18

Expert Comment

by:irweazelwallis
ID: 38805753
if you put bad item limit to 0 then it will just ignore any bad items

obviously this could lead to a lot of items being skipped
0
 

Expert Comment

by:Biggilux
ID: 39408749
Gentlemen,

Very interesting discussion,  Learned a lot here but I have a additional question to this thread, As you were discussing the fails in the export due to errors and corruptions,  is there a way to enumerate errors for the mailboxes, preferably in one command pumped to a .txt file.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Disabling the Directory Sync Service Account in Office 365 will stop directory synchronization from working.
This process describes the steps required to Import and Export data from and to .pst files using Exchange 2010. We can use these steps to export data from a user to a .pst file, import data back to the same or a different user, or even import data t…
To show how to create a transport rule in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Mail Flow >> Rules tab.:  To cr…
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…

746 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

9 Experts available now in Live!

Get 1:1 Help Now