Exporting M365 Mailbox to PST


Userlevel 6
Badge +5

This script showcases just how easy it is to use Veeam PowerShell cmdlets to export an M365 mailbox. This script is designed to be executed on a Veeam Backup for Microsoft 365 (VB365) v6 server and it's interactive so no parameters are required. Upon execution, the script polls for information which culminates in the specified user mailbox being exported to a PST file.

The code in this script could also be referenced to create a script to fully automate the mailbox export process.

For more detailed information, please follow the VeeamHub link:

https://github.com/VeeamHub/powershell/tree/master/VB365-ExportMailboxToPST

Here’s a screenshot of what it looks like in action:

 


7 comments

Userlevel 7
Badge +20

Very cool. 😎 Going to be adding this to my collection. 😁

Userlevel 7
Badge +17

Very interesting script, thank you. 😎👍🏼

Is there a command valid for all users?

Userlevel 7
Badge +13

Nice script @Chris.Arceneaux, thank you!!

Userlevel 6
Badge +5

Is there a command valid for all users?

To retrieve all users, you wouldn’t specify the “Name” parameter in the Get-VEXMailbox cmdlet.

 

That said, the script outlined in this post is designed to export a single user mailbox. Use case I had in mind was a business policy that requires mailboxes exported to PSTs for users no longer working at the company.

Is there any way to apply a date range filter with this? We have a weird process where we need to export 1 months worth of emails to PST every month.

Hi!  I need to add a date range.  Is that possible with this script?

Comment