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.