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/recipient-filters.md
+3-4Lines changed: 3 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -205,7 +205,7 @@ When creating your own custom OPath filters, consider the following items:
205
205
206
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
-
-**System values**: Don't enclose system values (for example, `$true`, `$false`, or `$null`).
208
+
-**System values**: Don't enclose system values (for example, `$true`, `$false`, or `$null`). To enclose the whole OPath filter in double quotation marks, you need to escape the dollar sign in system value (for example, `` `$true``).
209
209
210
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
@@ -225,9 +225,7 @@ When creating your own custom OPath filters, consider the following items:
225
225
226
226
-**Integer enclosed in double quotation marks**: Enclose the whole OPath filter in braces (for example `{CountryCode -eq "840"}`).
227
227
228
-
-**System values**: Enclose the whole OPath filter in single quotation marks or braces (for example `'HiddenFromAddressListsEnabled -eq $true'`).
229
-
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.
228
+
-**System values**: Enclose the whole OPath filter in single quotation marks or braces (for example `'HiddenFromAddressListsEnabled -eq $true'`). If you escape the dollar sign system value, you can also enclose the whole OPath filter in double quotation marks (for example, ``"HiddenFromAddressListsEnabled -eq `$true"``).
231
229
232
230
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
231
@@ -240,6 +238,7 @@ When creating your own custom OPath filters, consider the following items:
This example uses the Get-CASMailbox cmdlet to determine who in the organization has an Exchange ActiveSync mobile device. For each mobile device, the Exchange ActiveSync device statistics are retrieved.
63
63
64
-
**Note**: Although we typically recommend enclosing an OPath filter in double quotation marks " " instead of braces { }, you can't use double quotation marks here due to the `$true` system value. For more information, see [Additional OPATH syntax information](https://docs.microsoft.com/powershell/exchange/exchange-server/recipient-filters/recipient-filters#additional-opath-syntax-information).
64
+
**Note**: For more information about OPath filter syntax, see [Additional OPATH syntax information](https://docs.microsoft.com/powershell/exchange/exchange-server/recipient-filters/recipient-filters#additional-opath-syntax-information).
65
65
66
66
### -------------------------- Example 3 --------------------------
This example uses the Get-CASMailbox cmdlet to determine who in the organization has an Exchange ActiveSync mobile device. For each mobile device, the Exchange ActiveSync device statistics are retrieved.
69
69
70
-
**Note**: Although we typically recommend enclosing an OPath filter in double quotation marks " " instead of braces { }, you can't use double quotation marks here due to the `$true` system value. For more information, see [Additional OPATH syntax information](https://docs.microsoft.com/powershell/exchange/exchange-server/recipient-filters/recipient-filters#additional-opath-syntax-information).
70
+
**Note**: For more information about OPath filter syntax, see [Additional OPATH syntax information](https://docs.microsoft.com/powershell/exchange/exchange-server/recipient-filters/recipient-filters#additional-opath-syntax-information).
71
71
72
72
### -------------------------- Example 3 --------------------------
0 commit comments