Jump to content

Powershell Office 365 - Sweep inboxes for deleting all from domain, not specific user


Recommended Posts

Posted

Hi All,

 

We use a script to sweep and wipe emails from a specific user

 

Get-Mailbox -ResultSize unlimited | Search-Mailbox -SearchQuery 'from:"[email protected]"' -DeleteContent -force

 

But is there a way to do whole domains?

 

Standard wildcard * and removing the @ show an error.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...