Commands › Exchange Online
Get-ClientAccessRule
> [!NOTE] > Client access rules were deprecated for all Exchange Online organizations in September 2025. For more information, see Update on Client Access Rules Deprecation in Exchange Online. This cmdlet is functional only in Exchange Server 2019 or later. Use the Get-ClientAccessRule cmdlet to view client access rules. Client access rules help you control access to your organization based on the properties of the connection.
Quick start script
# Get-ClientAccessRule — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-ExchangeOnline -CertificateThumbprint $thumb -AppId $appId -Organization $org
# 2. Run and inspect
Get-ClientAccessRule | Format-List
# 3. Export for evidence / drift tracking
Get-ClientAccessRule | Export-Clixml .\ClientAccessRule-$(Get-Date -Format yyyyMMdd).xml
Syntax
Get-ClientAccessRule [[-Identity] <ClientAccessRuleIdParameter>]
[-Confirm]
[-DomainController <Fqdn>]
[-WhatIf]
[<CommonParameters>]
Parameters (4)
Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.