Skip to content

Commit abb93ed

Browse files
committed
Tweak to Exchange OPath filter info.
1 parent 44d2e9f commit abb93ed

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

exchange/docs-conceptual/exchange-server/recipient-filters/recipient-filters.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ When creating your own custom OPath filters, consider the following items:
205205

206206
- **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.
207207

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``).
209209

210210
- 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:
211211

@@ -225,9 +225,7 @@ When creating your own custom OPath filters, consider the following items:
225225

226226
- **Integer enclosed in double quotation marks**: Enclose the whole OPath filter in braces (for example `{CountryCode -eq "840"}`).
227227

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"``).
231229

232230
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:
233231

@@ -240,6 +238,7 @@ When creating your own custom OPath filters, consider the following items:
240238
|`'500'`|![Check mark](../../media/f3b4c351-17d9-42d9-8540-e48e01779b31.png)||![Check mark](../../media/f3b4c351-17d9-42d9-8540-e48e01779b31.png)|
241239
|`"500"`|||![Check mark](../../media/f3b4c351-17d9-42d9-8540-e48e01779b31.png)|
242240
|`$true`||![Check mark](../../media/f3b4c351-17d9-42d9-8540-e48e01779b31.png)|![Check mark](../../media/f3b4c351-17d9-42d9-8540-e48e01779b31.png)|
241+
|`` `$true``|![Check mark](../../media/f3b4c351-17d9-42d9-8540-e48e01779b31.png)|![Check mark](../../media/f3b4c351-17d9-42d9-8540-e48e01779b31.png)|![Check mark](../../media/f3b4c351-17d9-42d9-8540-e48e01779b31.png)|
243242

244243
- Include the hyphen before all operators. The most common operators include:
245244

exchange/exchange-ps/exchange/devices/Get-ActiveSyncDeviceStatistics.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,12 @@ This example retrieves the statistics for the mobile phone configured to synchro
5656

5757
### -------------------------- Example 2 --------------------------
5858
```
59-
$UserList = Get-CASMailbox -Filter {HasActiveSyncDevicePartnership -eq $true -and -not DisplayName -like 'CAS_{*'}; Get-Mailbox $UserList | foreach {Get-ActiveSyncDeviceStatistics -Mailbox $_}
59+
$UserList = Get-CASMailbox -Filter "HasActiveSyncDevicePartnership -eq `$true -and -not DisplayName -like 'CAS_{*'"; Get-Mailbox $UserList | foreach {Get-ActiveSyncDeviceStatistics -Mailbox $_}
6060
```
6161

6262
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.
6363

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).
6565

6666
### -------------------------- Example 3 --------------------------
6767
```

exchange/exchange-ps/exchange/devices/Get-MobileDeviceStatistics.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,12 @@ This example retrieves the statistics for the mobile phone configured to synchro
6262

6363
### -------------------------- Example 2 --------------------------
6464
```
65-
$UserList = Get-CASMailbox -Filter {HasActiveSyncDevicePartnership -eq $true -and -not DisplayName -like 'CAS_{*'} | Get-Mailbox; $UserList | foreach {Get-MobileDeviceStatistics -Mailbox $_.Identity}
65+
$UserList = Get-CASMailbox -Filter "HasActiveSyncDevicePartnership -eq `$true -and -not DisplayName -like 'CAS_{*'" | Get-Mailbox; $UserList | foreach {Get-MobileDeviceStatistics -Mailbox $_.Identity}
6666
```
6767

6868
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.
6969

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).
7171

7272
### -------------------------- Example 3 --------------------------
7373
```

0 commit comments

Comments
 (0)