I’m an admin and currently trying to empty one of my users inbox which is full, even the archive is.
Do you have any idea on how to empty a full mailbox?
I did the following
Connect-ExhangeOnline -UserPrincipalName <UPN>
Connect-IPPSSession
Ran this script from a ps1 file
$fecha_limite = Get-Date -Year 2020 -Month 12 -Day 31
$emails = Get-Mailbox -Identity [email protected] | Get-MailboxFolderStatistics -FolderScope Inbox | Where-Object { $_.LastModificationTime -lt $fecha_limite }
foreach ($email in $emails) {
Remove-MailboxItem -Identity $email.Identity
}
Had the following error
ConvertFrom-Json: Conversion from JSON failed with error: Unexpected character encountered while parsing value: U. Path '', line 0, position 0.
I also tried doing a searchQuery in MS Purview which I called “testEmailBackup”, export it and downloaded the pst files and proceeded to HardDelete as such:
New-ComplianceSearchAction -SearchName "testEmailBackup" -Purge -PurgeType HardDelete
I get no response and as It reads in documentation, only deletes like 10 emails per time.
Melany Villalobos Potoy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.