export to PST

Frequent Contributor

Hi experts
i want to export pst's for few mailboxes for mails before 12/31/2016, if they exists in mailbox or in archive mailbox. After exporting them to PST files i want to delete the mails.


which of the below syntax will help, if its wrong please help me to correct the syntax

New-MailboxExportRequest -Mailbox "user1@mydomain.com" -batchname user1 -ContentFilter
(Received -lt '12/31/2016')} -FilePath "\\sharedpath\user1.pst"


do i need to add archive switch i want to export if mails are in mailbox or in archive mailbox.

New-MailboxExportRequest -Mailbox "user1@mydomain.com" -batchname user1 -ContentFilter
(Received -lt '12/31/2016')} -FilePath "\\sharedpath\user1.pst" -IsArchive
experts help me with the syntax to know the status of batch for example here i used batchname user1


is the below syntax correct for deleting emails both in mailbox and archive mailbox

Search-Mailbox "user1@mydomain.com" -SearchQuery "Received:12/31/2016 AND kind:email" -DeleteContent -Force


0 Replies