Skip to content

Commit fe20aec

Browse files
authored
Update Set-ClientAccessRule.md
1 parent e5fae88 commit fe20aec

File tree

1 file changed

+36
-57
lines changed

1 file changed

+36
-57
lines changed

exchange/exchange-ps/exchange/Set-ClientAccessRule.md

Lines changed: 36 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ ms.reviewer:
1212
# Set-ClientAccessRule
1313

1414
## SYNOPSIS
15-
1615
This cmdlet is functional only in Exchange Server 2019 and in the cloud-based service. Some parameters and settings may be exclusive to one environment or the other.
1716

1817
Use the Set-ClientAccessRule cmdlet to modify existing client access rules. Client access rules help you control access to your organization based on the properties of the connection.
@@ -21,7 +20,7 @@ For information about the parameter sets in the Syntax section below, see [Excha
2120

2221
## SYNTAX
2322

24-
```powershell
23+
```
2524
Set-ClientAccessRule [-Identity] <ClientAccessRuleIdParameter>
2625
[-Action <ClientAccessRulesAction>]
2726
[-AnyOfAuthenticationTypes <MultiValuedProperty>]
@@ -48,33 +47,33 @@ Set-ClientAccessRule [-Identity] <ClientAccessRuleIdParameter>
4847
```
4948

5049
## DESCRIPTION
51-
5250
Client access rules are like mail flow rules (also known as transport rules) for client connections to your organization. You use conditions and exceptions to identify the connections based on their properties, and actions that allow or block the connections.
5351

54-
**Note**: Not all protocols support authentication type filters. Additionally, not all authentication types are supported for each protocol where authentication filters are supported. The supported authentication types per protocol are in the following table. Please use caution when mixing protocol and authentication types in the same rule.
55-
56-
|Protocol|Auth filter supported|BasicAuthentication|OAuthAuthentication|AdfsAuthentication|CertificateBasedAuthentication|NonBasicAuthentication|
57-
|---|:---:|:---:|:---:|:---:|:---:|:---:|
58-
|ExchangeActiveSync|Yes|Yes|Yes|No|Yes|No|
59-
|ExchangeAdminCenter|Yes|Yes|No|Yes|No|No|
60-
|ExchangeWebServices|No|N/A|N/A|N/A|N/A|N/A|
61-
|IMAP4|Yes|Yes|Yes|No|No|No|
62-
|OfflineAddressBook|No|N/A|N/A|N/A|N/A|N/A|
63-
|OutlookAnywhere|No|N/A|N/A|N/A|N/A|N/A|
64-
|OutlookWebApp|Yes|Yes|No|Yes|No|No|
65-
|POP3|Yes|Yes|Yes|No|No|No|
66-
|PowerShellWebServices|No|N/A|N/A|N/A|N/A|N/A|
67-
|RemotePowerShell|Yes|Yes|No|No|No|Yes|
68-
|REST|No|N/A|N/A|N/A|N/A|N/A|
69-
|UniversalOutlook|No|N/A|N/A|N/A|N/A|N/A|
70-
||||||||
52+
**Note**: Not all protocols support authentication type filters, and even protocols that support authentication type filters don't support all authentication types. The supported combinations are described in the following lists. Use caution when mixing protocols and authentication types in the same rule.
53+
54+
Protocols that support authentication type filters:
55+
56+
- ExchangeActiveSync: BasicAuthentication, OAuthAuthentication, and CertificateBasedAuthentication.
57+
- ExchangeAdminCenter: BasicAuthentication and AdfsAuthentication.
58+
- IMAP4: BasicAuthentication and OAuthAuthentication.
59+
- OutlookWebApp: BasicAuthentication and AdfsAuthentication.
60+
- POP3: BasicAuthentication and OAuthAuthentication.
61+
- RemotePowerShell: BasicAuthentication and NonBasicAuthentication.
62+
63+
Protcols that don't support authentication type filters:
64+
65+
- ExchangeWebServices
66+
- OfflineAddressBook
67+
- OutlookAnywhere
68+
- PowerShellWebServices
69+
- REST
70+
- UniversalOutlook
7171

7272
You need to be assigned permissions before you can run this cmdlet. Although this topic lists all parameters for the cmdlet, you may not have access to some parameters if they're not included in the permissions assigned to you. To find the permissions required to run any cmdlet or parameter in your organization, see [Find the permissions required to run any Exchange cmdlet](https://docs.microsoft.com/powershell/exchange/find-exchange-cmdlet-permissions).
7373

7474
## EXAMPLES
7575

7676
### Example 1
77-
7877
```powershell
7978
Set-ClientAccessRule "Allow IMAP4" -AnyOfClientIPAddressesOrRanges @{Add="172.17.17.27/16"}
8079
```
@@ -84,7 +83,6 @@ This example adds the IP address range 172.17.17.27/16 to the existing client ac
8483
## PARAMETERS
8584

8685
### -Identity
87-
8886
The Identity parameter specifies the client access rule that you want to modify. You can use any value that uniquely identifies the client access rule. For example:
8987

9088
- Name
@@ -105,7 +103,6 @@ Accept wildcard characters: False
105103
```
106104
107105
### -Action
108-
109106
The Action parameter specifies the action for the client access rule. Valid values for this parameter are AllowAccess and DenyAccess.
110107
111108
```yaml
@@ -122,7 +119,6 @@ Accept wildcard characters: False
122119
```
123120
124121
### -AnyOfAuthenticationTypes
125-
126122
This parameter is functional only in the cloud-based service.
127123
128124
The AnyOfAuthenticationTypes parameter specifies a condition for the client access rule that's based on the client's authentication type.
@@ -139,7 +135,7 @@ To enter multiple values and overwrite any existing entries, use the following s
139135

140136
To add or remove one or more values without affecting any existing entries, use the following syntax: `@{Add="Value1","Value2"...; Remove="Value3","Value4"...}`.
141137

142-
**Note**: Please refer to the table in the beginning of this article to understand what authentication types may be used with what protocols.
138+
**Note**: Refer to the Description section to see which authentication types can be used with what protocols.
143139

144140
```yaml
145141
Type: MultiValuedProperty
@@ -155,7 +151,6 @@ Accept wildcard characters: False
155151
```
156152

157153
### -AnyOfClientIPAddressesOrRanges
158-
159154
The AnyOfClientIPAddressesOrRanges parameter specifies a condition for the client access rule that's based on the client's IPv4 or IPv6 address. Valid values are:
160155

161156
- Single IP address: For example, 192.168.1.1 or 2001:DB8::2AA:FF:C0A8:640A.
@@ -182,7 +177,6 @@ Accept wildcard characters: False
182177
```
183178

184179
### -AnyOfProtocols
185-
186180
The AnyOfProtocols parameter specifies a condition for the client access rule that's based on the client's protocol.
187181

188182
Valid values for this parameter are:
@@ -220,7 +214,6 @@ Accept wildcard characters: False
220214
```
221215

222216
### -AnyOfSourceTcpPortNumbers
223-
224217
This parameter is reserved for internal Microsoft use.
225218

226219
```yaml
@@ -237,7 +230,6 @@ Accept wildcard characters: False
237230
```
238231

239232
### -Confirm
240-
241233
The Confirm switch specifies whether to show or hide the confirmation prompt. How this switch affects the cmdlet depends on if the cmdlet requires confirmation before proceeding.
242234

243235
- Destructive cmdlets (for example, Remove-\* cmdlets) have a built-in pause that forces you to acknowledge the command before proceeding. For these cmdlets, you can skip the confirmation prompt by using this exact syntax: `-Confirm:$false`.
@@ -257,7 +249,6 @@ Accept wildcard characters: False
257249
```
258250

259251
### -DomainController
260-
261252
This parameter is available only in on-premises Exchange.
262253

263254
The DomainController parameter specifies the ___domain controller that's used by this cmdlet to read data from or write data to Active Directory. You identify the ___domain controller by its fully qualified ___domain name (FQDN). For example, dc01.contoso.com.
@@ -276,7 +267,6 @@ Accept wildcard characters: False
276267
```
277268

278269
### -Enabled
279-
280270
The Enabled parameter specifies whether the client access rule is enabled or disabled. Valid values for this parameter are $true or $false.
281271

282272
```yaml
@@ -293,7 +283,6 @@ Accept wildcard characters: False
293283
```
294284

295285
### -ExceptAnyOfAuthenticationTypes
296-
297286
This parameter is functional only in the cloud-based service.
298287

299288
The ExceptAnyOfAuthenticationTypes parameter specifies an exception for the client access rule that's based on the client's authentication type.
@@ -310,7 +299,7 @@ To enter multiple values and overwrite any existing entries, use the following s
310299

311300
To add or remove one or more values without affecting any existing entries, use the following syntax: `@{Add="Value1","Value2"...; Remove="Value3","Value4"...}`.
312301

313-
**Note**: Please refer to the table in the beginning of this article to understand what authentication types may be used with what protocols.
302+
**Note**: Refer to the Description section to see which authentication types can be used with what protocols.
314303

315304
```yaml
316305
Type: MultiValuedProperty
@@ -326,7 +315,6 @@ Accept wildcard characters: False
326315
```
327316

328317
### -ExceptAnyOfClientIPAddressesOrRanges
329-
330318
The ExceptAnyOfClientIPAddressesOrRanges parameter specifies an exception for the client access rule that's based on the client's IPv4 or IPv6 address. Valid values are:
331319

332320
- Single IP address: For example, 192.168.1.1 or 2001:DB8::2AA:FF:C0A8:640A.
@@ -353,7 +341,6 @@ Accept wildcard characters: False
353341
```
354342

355343
### -ExceptAnyOfProtocols
356-
357344
This parameter is functional only in the cloud-based service.
358345

359346
The ExceptAnyOfProtocols parameter specifies an exception for the client access rule that's based on the client's protocol.
@@ -391,7 +378,6 @@ Accept wildcard characters: False
391378
```
392379

393380
### -ExceptAnyOfSourceTcpPortNumbers
394-
395381
This parameter is reserved for internal Microsoft use.
396382

397383
```yaml
@@ -408,7 +394,6 @@ Accept wildcard characters: False
408394
```
409395

410396
### -ExceptUserIsMemberOf
411-
412397
This parameter is reserved for internal Microsoft use.
413398

414399
```yaml
@@ -425,7 +410,6 @@ Accept wildcard characters: False
425410
```
426411

427412
### -ExceptUsernameMatchesAnyOfPatterns
428-
429413
This parameter is functional only in the cloud-based service.
430414

431415
The ExceptUsernameMatchesAnyOfPatterns parameter specifies an exception for the client access rule that's based on the user's account name in the format `<Domain>\<UserName>` (for example, `contoso.com\jeff`). This parameter accepts text and the wildcard character (\*) (for example, `*jeff*`, but not `jeff*`). Non-alphanumeric characters don't require an escape character.
@@ -448,7 +432,6 @@ Accept wildcard characters: False
448432
```
449433

450434
### -Name
451-
452435
The Name parameter specifies a unique name for the client access rule.
453436

454437
```yaml
@@ -465,7 +448,6 @@ Accept wildcard characters: False
465448
```
466449

467450
### -Priority
468-
469451
The Priority parameter specifies a priority value for the client access rule. A lower integer value indicates a higher priority, and a higher priority rule is evaluated before a lower priority rule. The default value is 1.
470452

471453
```yaml
@@ -482,7 +464,6 @@ Accept wildcard characters: False
482464
```
483465

484466
### -Scope
485-
486467
The Scope parameter specifies the scope of the client access rule. Valid values are:
487468

488469
- Users: The rule only applies to end-user connections.
@@ -502,7 +483,6 @@ Accept wildcard characters: False
502483
```
503484

504485
### -UserIsMemberOf
505-
506486
This parameter is reserved for internal Microsoft use.
507487

508488
```yaml
@@ -519,7 +499,6 @@ Accept wildcard characters: False
519499
```
520500

521501
### -UsernameMatchesAnyOfPatterns
522-
523502
This parameter is functional only in the cloud-based service.
524503

525504
The UsernameMatchesAnyOfPatterns parameter specifies a condition for the client access rule that's based on the user's account name in the format `<Domain>\<UserName>` (for example, `contoso.com\jeff`). This parameter accepts text and the wildcard character (\*) (for example, `*jeff*`, but not `jeff*`). Non-alphanumeric characters don't require an escape character.
@@ -542,39 +521,38 @@ Accept wildcard characters: False
542521
```
543522

544523
### -UserRecipientFilter
545-
546524
This parameter is functional only in the cloud-based service.
547525

548-
The UserRecipientFilter parameter specifies a condition for the client access rule that uses OPath filter syntax to identify the user based on a limited set of attributes.
526+
The UserRecipientFilter parameter specifies a condition for the client access rule that uses OPath filter syntax to identify the user based on a limited set of recipient properties. Client Access Rules don't support the full list of available recipient properties.
549527

550-
The filterable properties that you can use with this parameter are limited to the list below. Client Access Rules do not support the full list of recipient filters used by other features.
528+
You can use the following properties with this parameter:
551529

552530
- City
553531
- Company
554-
- CountryOrRegion (ISO 3166-1 alpha-2 code for the country must be used.)
532+
- CountryOrRegion (ISO 3166-1 alpha-2 country code.)
555533
- CustomAttribute1 to CustomAttribute15
556534
- Department
557535
- Office
558536
- PostalCode
559537
- StateOrProvince
560538
- StreetAddress
561539

562-
The syntax is `"Property -ComparisonOperator 'Value'"`
563-
564-
An example would be `"City -eq 'Redmond'"`
565-
566-
Another example would be `"CountryOrRegion -eq 'SG'"`
540+
The basic syntax for this parameter is `"Property -ComparisonOperator 'Value'"`:
567541

568542
- Property is one of the filterable properties in the list above (for example `City` or `CustomAttribute1`).
569543
- ComparisonOperator is an OPath comparison operator (for example `-eq` for equals and `-like` for string comparison). For more information about comparison operators, see [about_Comparison_Operators](https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_comparison_operators).
570-
- Value is the property value to search for. Enclose text values and variables in single quotation marks (`'Value'` or `'$Variable'`). If a variable value 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 "'","''")'`. Do not enclose integers or system values (for example, `500`, `$true`, `$false`, or `$null` are all proper uses).
544+
- Value is the property value to search for. Enclose text values and variables in single quotation marks (`'Value'` or `'$Variable'`). If a variable value 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 "'","''")'`. Don't enclose integers or system values in quotation marks (for example, use `500`, `$true`, `$false`, or `$null` instead).
571545
- 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.
572546

573-
You can chain multiple search criteria together using the logical operators `-and` and `-or`.
547+
For example:
574548

575-
An example would be, `"CustomAttribute1 -eq 'AllowOWA' -and CountryOrRegion -eq AU'"`
549+
- `"City -eq 'Redmond'"`
550+
- `"CountryOrRegion -eq 'SG'"`.
576551

577-
Another example would be, `"(CountryOrRegion -eq 'US' -and Department -eq 'Sales') -or Department -eq 'Research'"`.
552+
You can chain multiple search criteria together using the logical operators `-and` and `-or`. For example:
553+
554+
- `"CustomAttribute1 -eq 'AllowOWA' -and CountryOrRegion -eq AU'"`
555+
- `"(CountryOrRegion -eq 'US' -and Department -eq 'Sales') -or Department -eq 'Research'"`.
578556

579557
For detailed information about OPath filter syntax in Exchange, see [Additional OPATH syntax information](https://docs.microsoft.com/powershell/exchange/recipient-filters#additional-opath-syntax-information).
580558

@@ -592,7 +570,6 @@ Accept wildcard characters: False
592570
```
593571

594572
### -WhatIf
595-
596573
The WhatIf switch simulates the actions of the command. You can use this switch to view the changes that would occur without actually applying those changes. You don't need to specify a value with this switch.
597574

598575
```yaml
@@ -614,10 +591,12 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
614591

615592
## INPUTS
616593

594+
###
617595
To see the input types that this cmdlet accepts, see [Cmdlet Input and Output Types](https://go.microsoft.com/fwlink/p/?linkId=616387). If the Input Type field for a cmdlet is blank, the cmdlet doesn't accept input data.
618596

619597
## OUTPUTS
620598

599+
###
621600
To see the return types, which are also known as output types, that this cmdlet accepts, see [Cmdlet Input and Output Types](https://go.microsoft.com/fwlink/p/?linkId=616387). If the Output Type field is blank, the cmdlet doesn't return data.
622601

623602
## NOTES

0 commit comments

Comments
 (0)