I have to adapt a script that do "OnPromises" searches a hybrid context. I used the New-MailboxSearch
cmdlet to implement this script.
The script searches all the indicated mailboxes and copies the results into another mailbox account. Searches can be edited.
The options I have contemplated are:
New-ComplianceSearch
cmdlet. I don't know how to set an email folder to copy the results.Search-Mailbox
cmdlet. It would not be possible to edit the searches later.
Besides, is it possible to do this search in one step? That is, use a single cmdlet without having to do the search first on the mailboxes online and then on the mailboxes onpremises