none
search-mailbox报错 RRS feed

  • Question

  • Search-Mailbox -Identity xx@contoso.com -SearchQuery From:"a@sina.com" AND Received:"11/11/2019 00:00..11/24/2019 23:59" -TargetMailbox "administrator@contoso.com" -TargetFolder "searchresults" -LogOnly -LogLevel Full
    A positional parameter cannot be found that accepts argument 'AND'.
        + CategoryInfo         : InvalidArgument: (:) [Search-Mailbox], ParameterBindingException
        + FullyQualifiedErrorId : PositionalParameterNotFound,Search-Mailbox
        + PSComputerName       : server@contoso.com 

    请问怎么修改解决这个问题?

    Sunday, 24 November 2019 10:48 AM

Answers

  • 您好:

    根据您上面提供的报错信息,请尝试将 SearchQuery参数后的值改成此种形式 -SearchQuery {xxx AND xxx}

    Search-Mailbox -Identity xx@contoso.com -SearchQuery {From:"a@sina.com" AND Received:"11/11/2019 00:00..11/24/2019 23:59"} -TargetMailbox "administrator@contoso.com" -TargetFolder "searchresults" -LogOnly -LogLevel Full

     

    此致,

    Joyce Shen


    如果以上回复对您有所帮助,建议您将其“标记为答复”. 如果您对我们的论坛支持有任何的建议,可以通过此邮箱联系我们:tnsf@microsoft.com.

    Monday, 25 November 2019 3:54 AM