Commands › Exchange Online

Test-M365DataAtRestEncryptionPolicy

Exchange Online ExchangeOnlineManagement Test-*

Test an existing Microsoft 365 data-at-rest encryption policy.

Quick start script

# Test-M365DataAtRestEncryptionPolicy — 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
Test-M365DataAtRestEncryptionPolicy | Format-List

# 3. Export for evidence / drift tracking
Test-M365DataAtRestEncryptionPolicy | Export-Clixml .\M365DataAtRestEncryptionPolicy-$(Get-Date -Format yyyyMMdd).xml

Syntax

Test-M365DataAtRestEncryptionPolicy [[-Identity] <DataEncryptionPolicyIdParameter>]
 [-Confirm]
 [-DomainController <Fqdn>]
 [-WhatIf]
 [<CommonParameters>]

Parameters (4)

ParameterTypeRequiredWhat it controls
-Identity DataEncryptionPolicyIdParameter The Identity parameter specifies the Microsoft 365 data-at-rest encryption policy that you want to test. You can use any value that uniquely identifies the policy. For example:
-Confirm SwitchParameter The Confirm switch specifies whether to show or hide the confirmation prompt. How this switch affects the cmdlet depends on whether the cmdlet requires confirmation before proceeding.
-DomainController Fqdn This parameter is reserved for internal Microsoft use.
-WhatIf SwitchParameter The WhatIf switch shows what the command does without making any changes. You don't need to specify a value with this switch.

Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.