Commands › SharePoint Online

Restore-SPODataEncryptionPolicy

SharePoint Online Microsoft.Online.SharePoint.PowerShell Restore-*

Cmdlet to restore customer encryption status for your geo tenant when in recovery mode. For more information, see Controlling your data in Office 365 using Customer Key

Quick start script

# Restore-SPODataEncryptionPolicy — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-SPOService -Url https://$org-admin.sharepoint.com

# 2. Run and inspect
Restore-SPODataEncryptionPolicy -PrimaryKeyName <String> -PrimaryKeyVaultName <String> -PrimaryKeyVaultUri <Uri> | Format-List

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

Syntax — 2 parameter sets

BYOK_MultipleParameters

Restore-SPODataEncryptionPolicy -PrimaryKeyVaultName <String> -PrimaryKeyName <String>
 -PrimaryKeyVersion <Guid> -SecondaryKeyVaultName <String> -SecondaryKeyName <String>
 -SecondaryKeyVersion <Guid> [<CommonParameters>]

BYOK_Uri

Restore-SPODataEncryptionPolicy -PrimaryKeyVaultUri <Uri> -SecondaryKeyVaultUri <Uri> [<CommonParameters>]

Parameters (8)

ParameterTypeRequiredWhat it controls
-PrimaryKeyName String yes The name of the primary key.
-PrimaryKeyVaultName String yes The name of the primary key vault.
-PrimaryKeyVaultUri Uri yes The Uri of the primary key vault.
-PrimaryKeyVersion Guid yes The version of the primary key.
-SecondaryKeyName String yes The name of the secondary key.
-SecondaryKeyVaultName String yes The name of the secondary key vault.
-SecondaryKeyVaultUri Uri yes The Uri of the secondary key vault.
-SecondaryKeyVersion Guid yes The version of the secondary key.

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