Mark Minasi's Reader Forum
Mark Minasi's Reader Forum
Home | Profile | Register | Active Topics | Active Polls | Members | Search | FAQ | Minasi Forum RSS Feed
 All Forums
 HALP! Questions on Windows and Windows Server
 PowerShell
 Export-Mailbox script

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Note: please do not cross-post.
Cross-postings will be deleted and ignored.
Thanks for helping to keep this forum junk-free!
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
robsanders Posted - 08/20/2007 : 11:15:54 AM
I need some help with creating a PowerShell script. Right now we export all mailboxes from our Exchange 2003 environment with ExMerge. We plan on moving to Exchange 2007 soon, and I'm looking to replace that script. I know I need to use the Export-Mailbox cmdlet, but have some trouble getting it to work right.

Can someone point me in the right direction?

Edit: We want to export to .pst files if possible.
7   L A T E S T    R E P L I E S    (Newest First)
ddawson Posted - 02/29/2012 : 4:15:35 PM
Thanks a million for the great tip Adam. I just did this today for 10 Exchange 2007 mailboxes. Beats typing in one command at a time and waiting for each export to complete.
mccann.adam Posted - 11/15/2007 : 2:04:29 PM
I'm running Exchange 2007 in Production. We were trying to determine how to replace ExMerge with another tool. Exchange 2007 SP1 allows you do "Export-Mailbox" from the Exchange Management Shell to a PST.

We installed the Exchange 2007 Management tools (Console and Shell) on our workstations. We installed the Beta SP1 on our Workstations (NOT THE SERVER). From our workstations we can export to PSTs.

You have to make sure that the account you are logged in with, has rights to the mailbox.

So we read in a CSV file that contains the usernames with a heading of "Username". Use "Import-CSV" and use "foreach" to process through the list. One-Line Script would look like this:

foreach ($user in (Import-CSV "C:\export-mailbox.csv")) { Export-Mailbox "$($user.Username)@yourdomain.com" -PSTFolderPath "C:\" -Confirm:$false }

I use the email address of the user for identity. The folder path can be anywhere you want including UNC path. When a user leaves the agency, we need to archive user directories and mail. So we move the user directories to our Archive area and then export their mailbox and dump the PST in with the user directory. My PST path looks like:
-PSTFoldrPath "\\server\share\Archive\$($user.Username)"

I'm not sure what the new limitation is on PST size, but I've successfully exported mailboxes that resulted in over 10GB pst files.

It only does one at a time, and currently I have no error checking. I need to write in some exit/continue conditions but I'm still researching that. I saw a screen shot that look like it is moving 2 mailboxes at the same time, so I'd like to figure out how to do that with export-mailbox.

Here it is: http://www.microsoft.com/exchange/evaluation/features/admin.mspx
Look down under the heading Management Shell: Exchange Management Shell.

Anyway, hope this helps.

SAPIENScripter Posted - 08/21/2007 : 08:49:02 AM
I've used earlier versions of DPM and found it a pretty slick product. As for .pst support, as Jeffery Snover is fond of saying, "To ship is to choose." But that keeps us all employed, doesn't it!
robsanders Posted - 08/21/2007 : 08:30:46 AM
I really like the features of DPM 2007, even though it's still in beta. Given the fact that I can use this product also for our Sharepoint Portal site and the developer databases, this might be the way to go.

I still think it's a bit strange that they've left the export to .pst out of Exchange 2007, since we often used ExMerge to migrate a smaller Exchange environment.
SAPIENScripter Posted - 08/21/2007 : 07:50:06 AM
Personally, I think for business continuity, Data Protection Manager is the better choice. It's what the application is designed to do. Later, when you have Exchange 2007 you might be able to add some other pieces such as using Export-Mailbox.
robsanders Posted - 08/21/2007 : 06:00:22 AM
Our Exchange environment will be hosted in a data center and we want to back-up the data. This back-up needs to be stored at a remote location, due to requirements of the insurance company. Since we don't want to travel to the data center every day, we thought the best thing was to create .pst files and copy them over our 10Mbps connection during the night.

I read the help files, where they state that you can do everything that ExMerge does with Export-Mailbox. This is obviously not the case, so now I'm torn between using a beta of SP1 for Exchange or using beta 2 of DPM 2007. With DPM 2007 it looks like I'm able to back-up only the changes in logfiles, which would be enough (full back-up during weekend, incremental during business days).
clarinathan Posted - 08/21/2007 : 05:19:59 AM
Hi,

Could you let me know exactly what the requirements are.

Firstly, one thing to remember, is that you can't export to PST files unless you wait for Exchange 2007 SP1.

Cheers
Nathan

Mark Minasi's Reader Forum © 2002-2011 Mark Minasi Go To Top Of Page
This page was generated in 0.09 seconds. Snitz Forums 2000