Quantcast
Channel: Exchange Server Development forum
Viewing all articles
Browse latest Browse all 7132

-DeleteContent switch for Search-Mailbox Cmdlet does not work

$
0
0

Apologies if this isn't the right forum for this question. 

I'm having trouble with the Search-Mailbox cmdlet, specifically when I'm attempting to use the -DeleteContent switch in order to delete a message from a specific user's mailbox. 

I attempt to run the command: 

Search-Mailbox -identity "Some User" -DeleteContent -SearchQuery 'Subject:"Spam Email Subject Heading"'

And I get:

A positional parameter cannot be found that accepts argument '-DeleteContent'.
    + CategoryInfo          : InvalidArgument: (:) [Search-Mailbox], ParameterBindingException
    + FullyQualifiedErrorId : PositionalParameterNotFound,Search-Mailbox

Any idea what could be causing this issue? It's as if the shell does not recognize the existence of the -DeleteContent switch. I have no issues at all with the Search-Mailbox cmdlet except when it comes to using that switch. 

Some background:

- Yes, I am running the shell as an admin.
- I'm running EMS on my Exchange server itself through an RDS instance.
- Running Exchange Server 2010 - Version: 14.03.0181.006
- My user account is a member of: Discovery Management, Organization Management, Recipient Management, Records Management, Server Management, and UM Management.

Thank you in advance for any help any of you can provide!


Viewing all articles
Browse latest Browse all 7132

Trending Articles



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