Jump to content

Recommended Posts

Posted

Hey I'm trying to delete an email from all my users. I've stumbled across many sites describing possibly how to do this using powershell but I can't get it to work.

 

This is what I am using.

 

Get-Mailbox -ResultSize unlimited | Search-Mailbox -SearchQuery 'Subject:"this is the subject I want deleted"' –DeleteContent

 

Now the bit of that that doesn't seem to be working is the -DeleteContent

 

If I do a get and a search and dump the info into my own mailbox it works it tells me all of the users who have that email. As soon as I try and use the -DeleteContent it gives:

 

A parameter cannot be found that matches parameter name 'DeleteContent'.

+ CategoryInfo : InvalidArgument: (:) [search-Mailbox], ParameterBindingException

+ FullyQualifiedErrorId : NamedParameterNotFound,Search-Mailbox

+ PSComputerName : outlook.office365.com

 

Can't get past this and cant find anything telling me to use any other command or do it any other way.

 

I know Office 365 has had problems today and it's been up and down.

 

Help will earn you my xmas thanks and a drink if we ever meet up at something like BETT. :)

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...