Delete specific email from O365 mailboxes
1. Connect to Exchange On-line
- From the PowerShell console on an Exchange 2010 server:
$Cred = Get-Credential
$s = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell -Credential $cred -Authentication Basic –AllowRedirection
Import-PSSession $s
- Type in your Domain Admin credentials with username of <username>@domain.com
- Type in your Domain Admin credentials with username of domain\<username>
- Run this command:
you will need the distribution group name and subject of email
Get-DistributionGroupMember “Muncie Data Entry Firm” | Search-Mailbox -SearchQuery ‘Subject:”Backorder Request: Cancel My Order”‘ -DeleteContent -Force:$True