New-MailboxExportRequest – How To Export Multiple Well-Known Folder Names
2011-12-05 Initial Post
A few weeks ago I was trying to get a command together to export only the Calendar and Contacts folders from all mailboxes on an Exchange Server 2010 SP1 mailbox database. Based on the info from http://technet.microsoft.com/en-us/library/ff607299.aspx, I wanted to be able to export those well-known folders regardless of their names in another language. Since the organization I was doing this for had a few users based outside of the US, I didn’t want to hardcode the literal folder names, so I wanted to use the #<FolderName># format per the MS article.
Anyway, I could not find any reference on how to include more than one folder using the special format. I finally put in a support request with MS and got the answer. I’m posting this here in case anyone runs into this. The correct format is this: -IncludeFolders "#Calendar#", "#Contacts#"
Here is an example:
New-MailboxExportRequest -Mailbox Jimmy.Smith -FilePath \\CORPEXC001\D$\Jimmy.Smith.pst -IncludeFolders "#Calendar#", "#Contacts#"
This should also apply to the New-MailboxImportRequest cmdlet.
December 11th, 2013 at 3:13 PM
Would this command only import the calendar/contacts and not the mail? That's what we are looking to do.
December 14th, 2013 at 3:29 PM
Hi Cody: Thanks for checking out my site. Yes, the command only exports the calendar and contacts. I've used this command numerous times without any issues. You can use the import command with similiar parameters to import the calendar and contacts into another mailbox.
February 20th, 2014 at 7:52 AM
Thanks for the post. MS should put this in the command -examples.
April 9th, 2015 at 6:56 AM
Excellent, thanks for posting this up - just saved me from having to double up on work to get 2 folders 🙂