Avatar of C Emmons
C Emmons
Flag for United States of America

asked on 

Help using new-mailboxsearch for Exchange Online

Trying to run commend such as,

New-MailboxSearch -Name "searchoperation" -SourceMailboxes username -TargetMailbox "discovery" -StartDate "01/01/2005" -EndDate "12/31/2006"

A positional parameter cannot be found that accepts argument '-targetmailbox'.
    + CategoryInfo          : InvalidArgument: (:) [New-MailboxSearch], ParameterBindingExcep
    + FullyQualifiedErrorId : PositionalParameterNotFound,New-MailboxSearch

Can someone please assist - I've found example on Internet -- but everything I try gives this general error.

Also, what I really want is to dump captured mail to PST file , not to a mailbox.  I've given myself Discovery permissions, and Full-Access to mailbox being searched.

Thanks in advance.
C Emmons
ExchangeMicrosoft 365

Avatar of undefined
Last Comment
Jason Crawford

8/22/2022 - Mon