-DeleteContent switch for Search-Mailbox Cmdlet does not work RRS feed

  • Question

  • 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!

    Tuesday, April 8, 2014 8:22 PM

All replies

  • The exchange blog team has contained here with good explanation in detail about removing the specific user mailbox in exchange 2010. Please check this.
    Wednesday, April 9, 2014 7:55 AM