Recall / Delete a message sent to all the users by mistake - O365

First of all Open Azure PowerShell with Admin Privileges
Connect to O365 (Run the command mentioned below - Input O365 Global Admin Credentials)

Import-Module MSOnline
$O365Cred = Get-Credential

$O365Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri -Credential $O365Cred -Authentication Basic -AllowRedirection
Import-PSSession $O365Session -AllowClobber
Connect-MsolService -Credential $O365Cred

Run the following command to delete the message :

Get-Mailbox |Search-Mailbox -SearchQuery 'Subject:"Type the subject of the message"' -DeleteContent

Confirm the deletion , Either one by One or Typing A for all

It will take some time as it will go through all the mailboxes to find the mentioned subject email.

Download Remote Control Software :


Popular posts from this blog

How To Work On Cross Site Failure in Exchange 2010 Environment (Failover and Failback)

Activate Exchange 2010 Manually

Migrating SBS 2003 to Windows Server 2008 with Exchange 2007