Quantcast
Viewing latest article 3
Browse Latest Browse All 19436

Delete mailbox content

I should delete all mailboxes with a certain domain (e.g. daniele@contoso.com and not giovanni@microsoft.it) in a range of data.

The command for all the boxes should be:

foreach ($ mailbox in (get-mailbox)) {Search-Mailbox -id $ mailbox -SearchQuery '(Received: 01/01/2010..31/03/2020)' -DeleteContent -Force}

But how can I filter by domain?

Viewing latest article 3
Browse Latest Browse All 19436

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>