Commands › Power BI
Set-PowerBICapacityEncryptionKey
Updates the encryption key for the Power BI capacity.
Quick start script
# Set-PowerBICapacityEncryptionKey — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-PowerBIServiceAccount -ServicePrincipal -CertificateThumbprint $thumb -ApplicationId $appId -Tenant $tenantId
# 2. Capture the current state first — you cannot roll back what you never recorded
$before = Get-PowerBICapacityEncryptionKey
$before | Format-List
# 3. Make the change
Set-PowerBICapacityEncryptionKey -Capacity <Capacity> -CapacityId <Guid> -Key <EncryptionKey>
# 4. Verify and diff
$after = Get-PowerBICapacityEncryptionKey
Compare-Object ($before | Out-String) ($after | Out-String)
Syntax — 3 parameter sets
KeyNameAndCapacityId (Default)
Set-PowerBICapacityEncryptionKey -KeyName <String> -CapacityId <Guid> [<CommonParameters>]
KeyNameAndCapacity
Set-PowerBICapacityEncryptionKey -KeyName <String> -Capacity <Capacity> [<CommonParameters>]
KeyAndCapacityId
Set-PowerBICapacityEncryptionKey -Key <EncryptionKey> -CapacityId <Guid> [<CommonParameters>]
Parameters (4)
Reference facts derived from Microsoft documentation, © Microsoft, licensed MIT; restructured with original guidance by serv365.ai.