You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: exchange/docs-conceptual/exchange-server/recipient-filters/filter-properties.md
+7-6Lines changed: 7 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -9,12 +9,12 @@ ms.topic: article
9
9
ms.prod: exchange-server-itpro
10
10
localization_priority: Normal
11
11
ms.assetid: b02b0005-2fb6-4bc2-8815-305259fa5432
12
-
description: "Learn about the filterable properties for the Filter parameter in on-premises Exchange."
12
+
description: "Learn about the filterable properties for the Filter parameter in Exchange Server and Exchange Online."
13
13
---
14
14
15
15
# Filterable properties for the Filter parameter
16
16
17
-
You use the _Filter_ parameter to create OPATH filters based on the properties of user and group objects in Exchange Server 2016 or later, and Exchange Online. The _Filter_ parameter is available on these recipient cmdlets:
17
+
You use the _Filter_ parameter to create OPATH filters based on the properties of user and group objects in Exchange Server and Exchange Online. The _Filter_ parameter is available on these recipient cmdlets:
For more information, see [Recipient filters in Exchange Management Shell and Exchange Online PowerShell commands](recipient-filters.md).
51
+
For more information, see [Recipient filters in Exchange PowerShell commands](recipient-filters.md).
52
52
53
-
**Note**: The _Filter_ parameter is also available on other cmdlets (for example, **Get-MailboxStatistics**, **Get-Queue**, and **Get-Message**). However, the property values that are accepted by the _Filter_ parameter on these cmdlets aren't similar to the user and group properties that are described in this topic.
53
+
> [!NOTE]
54
+
> The _Filter_ parameter is also available on other cmdlets (for example, **Get-MailboxStatistics**, **Get-Queue**, and **Get-Message**). However, the property values that are accepted by the _Filter_ parameter on these cmdlets aren't similar to the user and group properties that are described in this topic.
54
55
55
56
## Filterable properties
56
57
@@ -66,12 +67,12 @@ The properties that have been _confirmed_ to work with the _Filter_ parameter in
66
67
67
68
- Not all recipient properties have a corresponding Active Directory property. The LDAP display name value in the table is "n/a" for these properties, which indicates that the property is calculated (likely by Exchange).
68
69
70
+
- Enclose the whole OPath filter in double quotation marks " ". If the filter contains system values (for example, `$true`, `$false`, or `$null`), use single quotation marks ' ' instead. Although this parameter is a string (not a system block), you can also use braces { }, but only if the filter doesn't contain variables. For more information, see [Additional OPATH syntax information](recipient-filters.md#additional-opath-syntax-information).
71
+
69
72
- Text string properties that accept wildcard characters require the `-like` operator (for example, `"Property -like '*abc'"`).
70
73
71
74
- To look for blank or non-blank property values, use the value `$null` (for example, `'Property -eq $null'` or `'Property -ne $null'`).
72
75
73
-
- For more information about creating filters in recipient commands, see [Additional OPATH syntax information](recipient-filters.md#additional-opath-syntax-information).
74
-
75
76
|**Property name**|**LDAP display name**|**Available on cmdlets**|**Value**|**Comments**|
76
77
|:-----|:-----|:-----|:-----|:-----|
77
78
|_AcceptMessagesOnlyFrom_|_authOrig_|**Get-DistributionGroup** <br/> **Get-DynamicDistributionGroup** <br/> **Get-Mailbox** <br/> **Get-MailContact** <br/> **Get-MailPublicFolder** <br/> **Get-MailUser** <br/> **Get-RemoteMailbox** <br/> **Get-UnifiedGroup**|String or `$null`|This filter requires the distinguished name of the individual recipient (a mailbox, mail user, or mail contact). For example, `Get-DistributionGroup -Filter "AcceptMessagesOnlyFrom -eq 'CN=Yuudai Uchida,CN=Users,DC=contoso,DC=com'"` or `Get-DistributionGroup -Filter "AcceptMessagesOnlyFrom -eq 'contoso.com/Users/Angela Gruber'"`. <br/> To find the distinguished name of the individual recipient, replace _\<RecipientIdentity\>_ with the name, alias, or email address of the recipient, and run this command: `Get-Recipient -Identity "<RecipientIdentity>" | Format-List Name,DistinguishedName`. <br/> Although this is a multivalued property, the filter will return a match if the property _contains_ the specified value.|
For more information about the filterable properties you can use with the _ContentFilter_ parameter, see [Filterable Properties for the ContentFilter Parameter](https://technet.microsoft.com/library/cf504a59-1938-489c-bb48-b27b2ac3234e.aspx).
194
+
For more information about the filterable properties that you can use with the _ContentFilter_ parameter, see [Filterable properties for the ContentFilter parameter](https://docs.microsoft.com/exchange/filterable-properties-for-the-contentfilter-parameter).
195
195
196
196
## Additional OPATH syntax information
197
197
198
-
When creating your own custom filters, consider the following items:
198
+
When creating your own custom OPath filters, consider the following items:
199
199
200
200
- Use the following syntax to identify the types of values that you're searching for:
201
201
202
-
-**Text values**: Enclose the text in single quotation marks (for example, `'Value'` or `'Value with spaces'`). Or, you can enclose a text value in double quotation marks, but that limits the characters that you can use to enclose the whole OPath filter.
202
+
-**Text values**: Enclose the text in single quotation marks (for example, `'Value'` or `'Value with spaces'`). Or, you can enclose a text value in double quotation marks, but that limits the characters you can use to enclose the whole OPath filter.
203
203
204
-
-**Variables**: Enclose variables in single quotation marks (for example, `'$User'`). If the variable value itself contains single quotation marks, you need to identify (escape) the single quotation marks to expand the variable correctly. For example, instead of `'$User'`, use `'$($User -Replace "'","''")'`.
204
+
-**Variables**: Enclose variables that need to be expanded in single quotation marks (for example, `'$User'`). If the variable value itself contains single quotation marks, you need to identify (escape) the single quotation marks to expand the variable correctly. For example, instead of `'$User'`, use `'$($User -Replace "'","''")'`.
205
205
206
-
-**Integer values**: You don't need to enclose integers (for example, `500`). You can often enclose integers in single quotation marks or double quotation marks, but that limits the characters that you can use to enclose the whole OPath filter.
206
+
-**Integer values**: You don't need to enclose integers (for example, `500`). You can often enclose integers in single quotation marks or double quotation marks, but that limits the characters you can use to enclose the whole OPath filter.
207
207
208
208
-**System values**: Don't enclose system values (for example, `$true`, `$false`, or `$null`).
209
209
210
-
- You need to enclose the whole OPath filter in double quotation marks " ", single quotation marks ' '. Although the filter parameter is a string (not a script block), you can often use braces Enclose the whole OPath filter in double quotation marks " ". If the filter contains system values (for example, `$true`, `$false`, or `$null`), use single quotation marks ' ' instead. Although this parameter is a string (not a system block), you can also use braces { }, but only if the filter doesn't contain variables.. The syntax depends on types of values that you're searching for and the characters you used (or didn't use) to enclose those values:
210
+
- You need to enclose the whole OPath filter in double quotation marks " or " single quotation marks ' '. Although any OPath filter object is technically a string and not a script block, you can still use braces { }, but only if the filter doesn't contain variables that require expansion. The characters that you can use to enclose the whole OPath filter depend on types of values that you're searching for and the characters you used (or didn't use) to enclose those values:
211
211
212
212
-**Text values**: Depends on how you enclosed the text to search for:
213
213
@@ -227,9 +227,9 @@ When creating your own custom filters, consider the following items:
227
227
228
228
-**System values**: Enclose the whole OPath filter in single quotation marks or braces (for example `'HiddenFromAddressListsEnabled -eq $true'`).
229
229
230
-
**Note**: You can't use search criteria that impose conflicting OPath syntax requirements together in the same filter. For example, searching for a property value using a variable requires that the entire OPath filter is enclosed in double quotation marks, but searching for a property with the value $true requires that the entire OPath filter is enclosed in single quotation marks or braces. Therefore, you can't use these two search criteria together in the same OPath filter.
230
+
**Note**: You can't use search criteria that impose conflicting character requirements for enclosing the whole OPath filter together in the same filter. For example, searching for an property using an expanded variable value requires that the entire OPath filter is enclosed in double quotation marks. But, you can't enclose an OPath filter in double quotation marks if you're searching for a property with the system value $true. Therefore, you can't use these two search criteria together in the same OPath filter.
231
231
232
-
The compatibility of values and the required OPath filter syntax are summarized in the following table:
232
+
The compatibility of search criteria and the valid characters that you can use to enclose the whole OPath filter are summarized in the following table:
233
233
234
234
|**Search value**|**OPath filter enclosed <br/> in double quotation marks**|**OPath filter enclosed <br/> in single quotation marks**|**OPath filter enclosed <br/> in braces**|
235
235
|:-----|:-----:|:-----:|:-----:|
@@ -261,19 +261,19 @@ When creating your own custom filters, consider the following items:
261
261
262
262
-**-notlike** (string comparison)
263
263
264
-
- Many of the properties for the _RecipientFilter_ and _Filter_ parameters accept wildcard characters. If you use a wildcard character, use the **like** operator instead of the **eq** operator. The **like** operator is used to find pattern matches in rich types, such as strings, whereas the **eq** operator is used to find an exact match.
264
+
- Many filterable properties accept wildcard characters. If you use a wildcard character, use the **-like** operator instead of the **-eq** operator. The **-like** operator is used to find pattern matches in rich types (for example, strings) whereas the **-eq** operator is used to find an exact match.
265
265
266
266
- For more information about operators you can use, see:
The following table contains links to topics that will help you learn more about the filterable properties that you can use with Exchange recipient commands.
275
275
276
276
|**Topic**|**Description**|
277
277
|:-----|:-----|
278
-
|[Filterable properties for the RecipientFilter parameter](recipientfilter-properties.md)|Learn more about the filterable properties for the _RecipientFilter_ parameter.|
279
-
|[Filterable properties for the Filter parameter](filter-properties.md)|Learn more about the filterable properties for the _Filter_ parameter.|
278
+
|[Filterable properties for the RecipientFilter parameter](recipientfilter-properties.md)|Learn more about the filterable properties that are available for the _RecipientFilter_ parameter.|
279
+
|[Filterable properties for the Filter parameter](filter-properties.md)|Learn more about the filterable properties that are available for the _Filter_ parameter.|
0 commit comments