Background: I wanted a set it and forget it way to back up a mailbox into a .pst. I used to remote into a PC with software and manually make a .pst in Outlook. Learning about all the fun things the Exchange Online V3 & the Security and Compliance Center had to offer led me to making this script. My favorite part of this script was learning about Do/Until. It still has my mind racing on all the fun ways I can flex this loop. I'll be honest, depending on mailbox size this method can take way longer then physically making a .pst via Outlook if the user already has their Outlook running cached but it is nice to just enter two values and move onto the next thing and not have to deal with Cacheing in Outlook before manually making a .pst. I'd also like to add, this type of download does not just get outlook data, but Teams MSG/Meetings as well. You can always trim out what you don’t need.
The #PowerShell code can be found on my #Github here. Prerequisites/Notes:
1. Must be assigned the eDescovery Manager role or higher. Steps:
1. It will prompt for a search name and the email you wish to make a .pst for.
2. It will then check,
You are running the script via PS7.X.X as the Exchange Online V3 currently only works in PS 7.X.X by default.
You are connected to the EXO V3, as it's required to connect to the Security and Compliance Center.
You are connected to the Security and Compliance Center as it's required to create a .pst.
3. It will now gather all the mailbox data related to the email you provided.
(The GUI in MS Purview will show the search you created.)
4. It will now start getting the mailbox ready for exporting.
(The GUI in MS Purview will show the export has started by appearing in the Export section.)
5. It will then start to generate a key to download the .pst, once done it will state its getting the download ready. Time may vary depending on mailbox size as well as Teams history.
Left clicking on the export in the GUI will show info on the export as well as the key it has created.
6. Now that the download key was created, it will start getting all the mailbox data ready for download. Once done, it will open the URL of the SCC to the export section.
You will then have to copy the key it generated into the eDescovery Export Tool. If this is the first time running this, you will be prompted to download the eDescovery Export Tool.
Click Open,
Paste in the key you copied to your clipboard and pick a location. I also like to rename the .pst via the "Advanced Options". The name picked here is just for the .pst file name and not what the .pst is called when open in Outlook. Exchange automatically puts the email as the name seen in Outlook when viewing the .pst. Then click start.
Time may vary depending on mailbox size as well as Teams history.
You can now archive or view the .pst!
The .pst will be a few folders down.
The Export summery will give you some reassurances on capturing everything.
Once in the .pst, it shows everything the user had in their mailbox as well as teams meeting and msg data.
Hope this helps save you some time!
Opmerkingen