No description
LICENSE | ||
purger.ps1 | ||
README.md |
Office 365 email purger
This PowerShell script will use Compliance Search to purge all content older than a specified date involving one or more specified users from all mailboxes in an Office 365 tenant.
Usage
-
Download the script and save it to your computer.
-
Edit the script and change the following lines to match your environment:
$Addresses = @("user@example.com", "user2@example.com") $MaxDate = "2016-01-01"
-
Run the script. You will be prompted for your Office 365 credentials.
-
Get a cup of coffee, and then another. This script will take a while to run. As in, hours or days, depending on the size of your organization.
Notes
- This script will delete all content older than the specified date, including items in the user's mailbox that were sent to or received from other users in the organization.
- The larger your organization, the longer this script will take to run.
- This is quite a dangerous script. Use it at your own risk.
- This script may delete more or less than you expect.
- The script is provided as-is. I am not responsible for any damage caused by running it.
License
This script is licensed under the MIT License.