New-MailboxExportRequest Fails to grab contacts -Mailbox 'User' -ContentFilter {MessageKind -eq 'Contact'} = 0 contacts RRS feed

  • Question

  • I am attempting to run a script that exports specific mailbox items to a PST. All items export without any issue except Contacts. Running with just contacts specified also retrieves 0 items.

    New-MailboxExportRequest -Mailbox 'user' -ContentFilter {((MessageKind -eq 'Email') -or (MessageKind -eq 'Calendar') -or (MessageKind -eq 'Doc') -or (MessageKind -eq 'Task') -or (MessageKind -eq 'Note') -or (MessageKind -eq 'Contact'))} -FilePath 'location'
    New-MailboxExportRequest -Mailbox 'user' -ContentFilter {MessageKind -eq 'Contact'}

    The only way I can retreive any contacts is to either remove the ContentFilter or to specify -SourceRootFolder '#Contacts#'

    New-MailboxExportRequest -Mailbox 'user'  -FilePath 'location'
    New-MailboxExportRequest -Mailbox 'User' -SourceRootFolder "#Contacts#" -FilePath 'Location'

    Anyone else notice that contacts are not retrieved when using ContentFiltering? Anyone have any ideas on what I should try? Exchange 2010 SP3




    Monday, November 18, 2013 9:48 PM

All replies

  • Hi

    Try this:

    New-MailboxExportRequest -Mailbox UserA -IncludeFolders "#Contacts#" -filepath \\server\share\userA.pst

    Wednesday, November 20, 2013 8:39 AM
  • Thanks, DareDevil57. That works, but it doesn't achieve my desired end result which is to use the content filter to exclude certain MessageKinds and include others. I want to be able to gather Email, Tasks, Notes, Calendar, Docs and Contact and exclude all other MessageKinds. If I run my first or second example with the -IncludeFolders switch, it still will not include the contacts.

    Wednesday, November 20, 2013 3:56 PM
  • Have you considered any 3rd party archiving software? Mailsafe can sweep up all emails older than a certain time period (administrators choice), archive them away and then hard delete them from the users inbox, helping to keep within quota's. The User can then search from the Outlook toolbar for any archived items. More information can be found at

    Wednesday, November 20, 2013 5:30 PM