Importing PST file using Import-Mailbox Command Crashes Powershell
I am attempting to import a .pst file into a mailbox via the Import-Mailbox powershell command. The command starts and imports the deleted items and creates the folder structure in the Inbox then crashes powershell. I am running Outlook 2007 SP2 on a Windows 2003 Std SP2 server w/Exchange 2007 SP1 Update Rollup 8 management tools. I have tried everything i can think of. This happens on multiple machines with similar packages installed. No anti-virus software is installed. It happens on both pst files i am testing with and no errors are logged in the event logs either on the exchange mailbox server or the server i am using to do the import.
June 22nd, 2009 7:52pm

What do you mean multiple machines?Where are you performing the import?What did you use to export the data?Have you tried to import the pst to the mailbox using Outlook?SF - MCITP:EMA, MCTS
Free Windows Admin Tool Kit Click here and download it now
June 22nd, 2009 9:17pm

I have used two different management servers to attempt the import. Powershell crashes on both I am performing the import from a Windows Server 2003 SP2 machine with Exchange 2k7 management tools (sp1 update 8) and Outlook 2007 SP2 installed The PST file was not exported from the mailbox with powershell. I am working on a solution to re-import PST files that are scattered on network shares back into mailboxes now that an Exchange archiving solution is available. My plan was to import the PST files that are scattered around and then archive the old data back out with the archiving software. Just trying to get a handle on the pst sprawl. I have not tried to import the pst to the mailbox, but i can attach it as a data file in outlook without any errors.
June 22nd, 2009 9:37pm

hi,please check these ;- is database mounted?- is there any event on event viewer?- please check your server' health status with ExBPA and see is there any problem with your database...and look at here ;http://www.msexchange.org/articles_tutorials/exchange-server-2007/management-administration/exchange-2007-sp1-mailbox-management-part1.htmlregards, Mumin CICEK | Exchange - MVP | www.cozumpark.com | www.mumincicek.com
Free Windows Admin Tool Kit Click here and download it now
June 22nd, 2009 11:33pm

I bet the combo of Outlook and EMS on the same machine is the culprit.Do you have access to the actual exchange mailbox server? Try to perform the import command on the actual Mailbox server and see what happens.SF - MCITP:EMA, MCTS
June 23rd, 2009 5:38am

Actually, the directions for the Import-Mailbox command require Outlook to be installed on the machine being used. See http://technet.microsoft.com/en-us/library/bb629586.aspx And to the previous question, yes the database is mounted and no, there are no events in the even logs. Powershell just pops up an error that says Powershell is terminating and my command window goes away. Server health is find and the database has no problems.
Free Windows Admin Tool Kit Click here and download it now
June 23rd, 2009 4:52pm

Hmm....Have you tried to perform it on the actual Exchange Server without the outlook client installed? I'm curious to know what will happen if you do it from a server instead of a client machine.SF - MCITP:EMA, MCTS
June 23rd, 2009 5:25pm

Heath,Bardapony is right.It is not recommended to have Outlook installed on a server that has Exchange installed, this goes back to even to the 2003 days. When I do export/import I have it setup an on 32 bit xp client with all the requirements to make it work and never had an issue. As a best practice I dont install any other application on an exchange servers unless it has to be there meaning adobe, winzip, Office, etc. are not on the server.http://support.microsoft.com/kb/266418
Free Windows Admin Tool Kit Click here and download it now
June 23rd, 2009 6:44pm

As I mentioned above, I do NOT have it installed on the actual Exchange server. I have two different management servers set up that I have been doing my testing with. The documentation clearly states that Outlook is required. Is this a mistake? Do you not have Outlook installed on the machine you do import pst files with?
June 23rd, 2009 7:58pm

Hi,As my understand that when you import pst to mailbox,Exchange Manangement Shell crashed,is that right?If yes,then please try to check event log to find any powershell related error event and then post the detail error information here.Besides,I'd like to know what is the OS version where you run Exchange ManagementTools.Have you tried to import mailbox from Exchange Server?Regards,Xiu
Free Windows Admin Tool Kit Click here and download it now
June 24th, 2009 9:57am

Sorry for the previous mis-understood post. To answer your question YES Outlook must be installed. I re-read the post again and you said that you tried it on multiple machines, what are the OS and SP level of these machines, also what version of Office and SP level as well? There has to be some time of error, I think its more the client machines if PowerShell is crashing that are having the issue, have you tested it against multiple Mailbox Servers to see if it Crash no matter which MB you try to import/Export to and from? Also if you run other PowerShell cmd's against the server like test the servers health etc does that work fine just wondering if it crashes on other cmdlets.
June 24th, 2009 11:04am

Both servers i tried the import from were Windows Server 2003 SP2. I have tried with Office 2003 SP3 and Office 2007 SP1. The event logs show no signs of the crash other than an information log stating that the pst is going to be imported to the mailbox. It is a hard crash with no log generated....even using the -verbose option doesn't give any hints. I have tried importing to different mailboxes...same result. All other powershell scripts that I have tested work fine. The EMC works fine.
Free Windows Admin Tool Kit Click here and download it now
June 24th, 2009 5:57pm

Have you tried opening Outlook and importing the PST using the native Import / Export?Your PST's were not created by powershell's export-mailbox, so there is a chance they are corrupt.Try a scanpst on one of them?Karl
June 25th, 2009 12:07am

I have been able to successfully import the PST directly into the mailbox using Outlook. No errors doing it that way. I have scanned the two PSTs I am testing with ScanPST...no errors in either.
Free Windows Admin Tool Kit Click here and download it now
June 25th, 2009 6:49pm

OK, Can you now do an export-mailbox on that mailbox export to a pst, and try importing it?And, just because I don't see it asked, is this PowerShell version 1?Karl
June 25th, 2009 6:51pm

Yes, it is powershell v1.0. I will try the export and let you know.
Free Windows Admin Tool Kit Click here and download it now
June 25th, 2009 7:01pm

Yes, after importing & exporting the mailbox with the native Outlook 2003 toolset, i was able to import the resulting PST file back in with import-mailbox with no errors. Any ideas what could be causing this type of behavior?
June 25th, 2009 7:23pm

Import-Mailbox doesn't like the old PST's ;)Add a "-BadItemLimit 5" to the cmdlet paramaters on one of the pst's and see what happens?pipe your whole import-mailboxto|out-file c:\import.log and see if anything shows up?
Free Windows Admin Tool Kit Click here and download it now
June 25th, 2009 7:39pm

Nope, same behavior.
June 25th, 2009 11:16pm

Nothing ahowed up in c:\import.log?Karl
Free Windows Admin Tool Kit Click here and download it now
June 25th, 2009 11:17pm

Nope...blank file.
June 25th, 2009 11:30pm

Try this;Create a test file:Add-PSSnapin *exchange*Import-Mailbox (your complete import line)Save the file as a .ps1 file to somewhere easy, like c:\test.ps1Now, from a command prompt, type this:powershell <path to script file>If you use my suggested name:powershell c:\test.ps1Do you see errors?Karl
Free Windows Admin Tool Kit Click here and download it now
June 26th, 2009 12:09am

If we are trying to capture errors here then may be I can suggest to use verbose logging and pipe the output into a text file.Milind Naphade | MCTS:M | http://www.msexchangegeek.com
June 26th, 2009 2:17am

Karl, launching a script gave the same result. Verbose logging gives this as the last line in the output VERBOSE: Import-Mailbox : [cnx_hbowlin] Merging messages.
Free Windows Admin Tool Kit Click here and download it now
June 26th, 2009 7:26pm

Heath;What else was in the verbose output?Karl
June 26th, 2009 7:45pm

Have you tried to do this from the actual Exchange 2007 server? I assume you are trying to import the pst to an Exchagne 2007 email account to Exchange 2007 correct?Have you tried to perform the import on a Windows XP machine using the 32bit EMC/EMS rather then using Windows 2003 server? I honestly recall in the back of my head a problem with Exchange 2007 and Outlook CDOs or something like that. I could be wrong but I remember something from a year ago..... Seriously though, try it from a Windows XP machine running the Exchange Managerment Tools and see what happens rather then a W2K3 Server.SF - MCITP:EMA, MCTS
Free Windows Admin Tool Kit Click here and download it now
June 27th, 2009 4:12pm

Have you tried to do this from the actual Exchange 2007 server? I assume you are trying to import the pst to an Exchagne 2007 email account to Exchange 2007 correct? Have you tried to perform the import on a Windows XP machine using the 32bit EMC/EMS rather then using Windows 2003 server? I honestly recall in the back of my head a problem with Exchange 2007 and Outlook CDOs or something like that. I could be wrong but I remember something from a year ago..... Seriously though, try it from a Windows XP machine running the Exchange Managerment Tools and see what happens rather then a W2K3 Server. SF - MCITP:EMA, MCTS Yea I double check the link i posted as well I never tried from a 2003 server either, I've always done it from an XP machine, but again we know its works because you got it to work with a newly export PST, so I think its more to do with the PST file itself, hopefully you dont have a bunch of them, if so let the users re-import them =)
June 27th, 2009 5:08pm

How are you exporting to a PST? Best case would be to use ExMerge to export from the old server and then use Exchange 2007 import-pst to import.I have come across issues in the past using the Export-pst command......SF - MCITP:EMA, MCTS
Free Windows Admin Tool Kit Click here and download it now
June 27th, 2009 8:05pm

I decided to build a test Windows XP machine and try the import from there. Same behavior. Powershell crashes, but an import using Outlook works with the same PST. And i wish I didn't have a lot of them, but unfortunately that is not the case. I have about 240 pst file scattered on the network that need to be put into mailboxes so that data can be archived back out for compliance purposes. Anybody else have any ideas?
July 1st, 2009 7:43pm

What are you using for an archiving soloution?Karl
Free Windows Admin Tool Kit Click here and download it now
July 1st, 2009 7:47pm

We are using CommVault Simpana. I really like the software, but it has limited ability to get control of PST sprawl.
July 1st, 2009 9:38pm

Their white paper says one of their "Key Capabilities" is "Centrally manage .PST files -- Auto0discover and import .PST files on user desktops or file shares directly ointo the archive"If THAT's not working, I'd call them :)Otherwise, have the users import their own PST's ;)Karl
Free Windows Admin Tool Kit Click here and download it now
July 1st, 2009 10:08pm

How big are the PST files you're trying to import?What did you use to create the PSTs in the first place? I'm sorry if you mentioned this but I didnt' find it when skimming the thread.It is possible the PST file is too large or corrupt.I have done this a number of times using ExMerge from Exchange 2003 into Exchange 2007 etc.I'm curious to know if the PST file is corrupt or not compatible with the import command.SF - MCITP:EMA, MCTS
July 1st, 2009 10:23pm

We are on v7 of CommVault Simpana and their PST importing solution is a tool in their resource kit that is "as is" and to make it work support told me I had to install Outlook on the Exchange server... :( The PST files range in size...the two that I am having problems with in testing are 200 MB or so. These PST files were probably originally created with the Outlook export/archive functionality. This customer did not control creation of PST files until recently, so users just scattered PST files on the network and now we are attempting to clean it up. It looks like we are just going to move to manual mode on this deal. I was really hoping we could find an automated way to do it, but it has turned into more headache than anything. Thanks to all for the comments and suggestions.
Free Windows Admin Tool Kit Click here and download it now
July 2nd, 2009 12:53am

I have had a similar behavior. Please check if the pst files are corrupted. To check this, just open them with Outlook. Outlook repairs corrupt pst files. After the repair, it was possible to import them.
August 3rd, 2009 7:16pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics