In Exchange Management Shell, you can run the following command to export a mailbox to PST with variables like delete all mail from mailbox after export or maybe excluding Contacts or Calendar.
The command you should use is this:
Export-Mailbox –Identity “alias” -PSTFolderPath C:MAILARCHIVES -EndDate “01/01/2015” -ExcludeFolders “Contacts”,”Drafts”,”Notes”,”Calendar”,”Tasks” -DeleteContent
The explaination of this command is as below:
- Export-Mailbox – this is the powershell command to export the mailbox
- -Identity “alias” – this is the “alias” of the Exchange Mailbox you want to export
- -PSTFolderPath C:MAILARCHIVES – this is the location your PST will be exported to
- -EndDate “01/01/2015” – when you want to export up to
- -ExcludeFolders – The items you may want to exclude from export – remove or add where applicable
- -DeleteContent – Deletes the mailbox items after export
That is it, create your custom command for your requirements and run it in EMS.
If you have any questions or comments on this guide, please feel free to leave us a message below.
Enter your email address below and click the Subscribe button to receive email notifications about new and exciting downloads available through our website at https://www.techygeekshome.com
You will also receive notifications about new technical guides, latest news and MSI installer downloads that are available through our blog here at https://blog.techygeekshome.info
We will not spam you and we will not pass on any of your details to anyone else. We tend to post new content once or twice a week.
You can unsubscribe any time you like.