Dears,
Could you advice if the below command is correct to delete all the emails from a specific domain, please?.
Get-Mailbox -ResultSize Unlimited | Search-Mailbox -Searchquery 'from:"*@xyz.com"' -DeleteContent -Confirm:$true > c:\temp\delete1.txt
Where xyz.com is a spam domain in the above example.
Regards,
AB