Quantcast
Channel: Exchange Server 2013 - Administration, Monitoring, and Performance 论坛
Viewing all articles
Browse latest Browse all 3457

Command to delete all the emails from a specific domain.

$
0
0

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



Viewing all articles
Browse latest Browse all 3457

Trending Articles