Recently I’ve encountered a situation…
– An administrator had enabled an in-place archive on a few mailboxes
– He wasn’t aware of what archiving would do to his users’ mailboxes – End of story 🙁
The procedure of getting all the items back to the main mailbox is a bit complicated, mostly because the procedure must involve explicit connection to the user’s mailbox, exporting the archive mailbox to PST and re-importing it back to the main mailbox.
There are tools out there that may help perform the above actions if you are willing to pay 🙂
This is why I wrote a cool script that will move all the archived items back to the mailbox.
Here are some screenshots and guidelines:
- First of all, this script make use of the EWS Managed API version 2.2 – download
- Now download my script – download
- You must create a new Retention Policy without any Archive Tags and assign it to the specified user’s mailbox
- The administrator user that manages the user’s mailbox, should be an Organization Management user and assigned the ApplicationImpersonation role, although you will be presented with a prompt to assign the role (and remove the assignment) during the script run.
Starting the script is easy… Just run it without any parameters
Enter the admin username (of type User Principal Name), the password of this admin and the user’s mailbox (also UPN). That’s it!
As stated before, you may need to assign the ApplicationImpersonation role to the admin user
Now sit back and watch how the items move back to the main mailbox 🙂
At the end you will find a log like this in the same folder of the script.
- Fixed the issue with Folders which are in a foreign languages or has special characters in them – the script was modified to ignore the folder name and concentrate solely on the folder Id parameter.
- Added feature: The script will move folders which are not mirrored in the main mailbox – This folder will move to the “\Archive” folder in the main mailbox (if this folder doesn’t exist, the script will create it)
- Added support for Exchange On-Premise: Only works with Kerberos authentication
Have a great time using this script!