Simply Move All Your Archive Back to the Mailbox

4 בOctober 2016

אין תגובות
Hey Friends!

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.2download
  • 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.

Have a great time using this script!

הוסף תגובה
facebook linkedin twitter email

Leave a Reply

Your email address will not be published. Required fields are marked *