Site icon Crackjet

Office 365 – Unable to permanently remove email in a full mailbox

If a mailbox is in Litigation Hold, the hold needs to be removed before mails can be removed.

Example:
GA Account: sysadm@example283912322.com
User’s Mailbox: user@example283912322.com
Allocated Quota: 99GB
Current usage: 100.1GB

1.  $SccSession = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.compliance.protection.outlook.com/powershell-liveid/ -Credential $credential -Authentication "Basic" -AllowRedirection

2.  Import-Module ExchangeOnlineManagement

3.  Connect-IPPSSession -UserPrincipalName sysadm@example283912322.com

4.  Get-ComplianceCase

5.  New-ComplianceSearch -Name "UserMails" -ExchangeLocation "user@example283912322.com"

6.  Get-ComplianceSearch -Identity 'UserMails' | Format-List

7.  Start-ComplianceSearch -identity "UserMails"

8.   Get-ComplianceSearch
- Wait for status to be "Completed"

9.   New-ComplianceSearchAction -SearchName "UserMails" -Purge -PurgeType HardDelete

10.  Get-ComplianceSearchAction
- Wait for status to be "Completed"

11. Remove-ComplianceSearchAction -Identity "UserMails_Purge"

12. Each action will only remove 10 items. Repeat 9 to 11 until desired reduction of storage is accomplished.

References:

Exit mobile version