Using Search-Mailbox to Process Multiple Mailboxes with Different Queries

%3CLINGO-SUB%20id%3D%22lingo-sub-335046%22%20slang%3D%22en-US%22%3EUsing%20Search-Mailbox%20to%20Process%20Multiple%20Mailboxes%20with%20Different%20Queries%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-335046%22%20slang%3D%22en-US%22%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20Search-Mailbox%20cmdlet%20is%20a%20very%20powerful%20weapon%20for%20Exchange%20administrators.%20It%20has%20some%20quirks%2C%20but%20the%20Invoke-Command%20cmdlet%20helps%20us%20get%20around%20one%2C%20which%20is%20how%20to%20use%20a%20different%20search%20query%20for%20each%20mailbox%20processed%20in%20a%20set%20of%20mailboxes.%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Foffice365itpros.com%2F2019%2F02%2F12%2Fvariables-search-mailbox%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Foffice365itpros.com%2F2019%2F02%2F12%2Fvariables-search-mailbox%2F%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-335046%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExchange%20Online%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EExchange%20Server%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
MVP

 

The Search-Mailbox cmdlet is a very powerful weapon for Exchange administrators. It has some quirks, but the Invoke-Command cmdlet helps us get around one, which is how to use a different search query for each mailbox processed in a set of mailboxes.

https://office365itpros.com/2019/02/12/variables-search-mailbox/

0 Replies