|
| 1 | +--- |
| 2 | +title: Filters in the V2 module |
| 3 | +ms.author: chrisda |
| 4 | +author: chrisda |
| 5 | +manager: dansimp |
| 6 | +ms.date: |
| 7 | +ms.audience: Admin |
| 8 | +ms.topic: article |
| 9 | +ms.service: exchange-online |
| 10 | +ms.reviewer: navgupta |
| 11 | +localization_priority: Priority |
| 12 | +ms.collection: Strat_EX_Admin |
| 13 | +ms.custom: |
| 14 | +ms.assetid: |
| 15 | +search.appverid: MET150 |
| 16 | +description: "Learn about how to use filtering for cmdlets in the Exchange Online V2 module." |
| 17 | +--- |
| 18 | + |
| 19 | +# Filters in the Exchange Online V2 module |
| 20 | + |
| 21 | +The Exchange Online PowerShell V2 module (abbreviated as the EXO V2 module) contains a few new cmdlets that are optimized for high speed, high volume operations, and (after you connect to your organization) gives you access to the hundreds of existing cmdlets in the service. For more information, see [Use the Exchange Online PowerShell V2 module](exchange-online-powershell-v2.md). |
| 22 | + |
| 23 | +In order to get the most out of the EXO V2 module, you need to follow the guidance in this topic. |
| 24 | + |
| 25 | +## Use client-side filtering for the best performance |
| 26 | + |
| 27 | +Server-side filtering uses the available _Filter_ or _RecipientFilter_ parameters on a cmdlet. Client-side filtering uses the [Where-Object](https://docs.microsoft.com/powershell/module/microsoft.powershell.core/where-object) cmdlet (also known as **where** or **?**). |
| 28 | + |
| 29 | +Generally, you get much better performance with server-side filtering. However, for the EXO V2 module, you actually get better performance when using client-side filtering. We're working on improving the performance of server-side filtering in module. |
| 30 | + |
| 31 | +## Supported and unsupported attributes |
| 32 | + |
| 33 | +Although the EXO V2 module supports the majority of filterable attributes, the following attributes are currently not supported for filtering: |
| 34 | + |
| 35 | +|||| |
| 36 | +|---|---|---| |
| 37 | +|**Cmdlet**|**Attribute**|**LDAP Display Name**| |
| 38 | +|[Get-CASMailbox](https://docs.microsoft.com/powershell/module/exchange/get-casmailbox)|MemberOfGroup <br/><br/> ExternalDirectoryObjectId|memberOf <br/><br/> msExchExternalDirectoryObjectId| |
| 39 | +|[Get-Mailbox](https://docs.microsoft.com/powershell/module/exchange/get-mailbox)|DeletedItemFlags <br/><br/> ExternalDirectoryObjectId <br/><br/> LanguagesRaw <br/><br/> MasterAccountSid <br/><br/> MemberOfGroup <br/><br/> RequireAllSendersAreAuthenticated <br/><br/> SCLDeleteThresholdInt <br/><br/> SCLJunkThresholdInt <br/><br/> SCLQuarantineThresholdInt <br/><br/> SCLRejectThresholdInt|deletedItemFlags <br/><br/> msExchExternalDirectoryObjectId <br/><br/> msExchUserCulture <br/><br/> msExchMasterAccountSid <br/><br/> memberOf <br/><br/> msExchRequireAuthToSendTo <br/><br/> msExchMessageHygieneSCLDeleteThreshold <br/><br/> msExchMessageHygieneSCLJunkThreshold <br/><br/> msExchMessageHygieneSCLQuarantineThreshold <br/><br/> msExchMessageHygieneSCLRejectThreshold| |
| 40 | +|[Get-Recipient](https://docs.microsoft.com/powershell/module/exchange/get-recipient)|CountryCode <br/><br/> ExternalDirectoryObjectId <br/><br/> MasterAccountSid <br/><br/> MemberOfGroup <br/><br/> Members|countryCode <br/><br/> msExchExternalDirectoryObjectId <br/><br/> msExchMasterAccountSid <br/><br/> memberOf <br/><br/> member| |
| 41 | +| |
| 42 | + |
| 43 | +## Supported and unsupported operators |
| 44 | + |
| 45 | +The following operators are fully supported for all string formats in the EXO V2 module: |
| 46 | + |
| 47 | +- -eq |
| 48 | +- -and |
| 49 | +- -ne |
| 50 | +- -or |
| 51 | +- -not |
| 52 | +- -lt |
| 53 | +- -gt |
| 54 | + |
| 55 | +The -like and -notlike operators are limited in using wildcards (*). Specifically, you can only use wildcards at the beginning of a string value, at the end of a string value, or both. |
| 56 | + |
| 57 | +For example, the following text search is not supported: |
| 58 | + |
| 59 | +`"UPN -like 'A*B*C'` |
| 60 | + |
| 61 | +However, the following searches are supported: |
| 62 | + |
| 63 | +`"UPN -like 'A*' -and UPN -like '*C' -and UPN like '*B*'"` |
0 commit comments