Commands › SharePoint Online
Restore-SPODataEncryptionPolicy
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)
Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.