Az Powershell to get disk encryption is pmk or cmk

MS Techie 2,601 Reputation points

The azure vm disk can be cmk or pmk encrypted. Which azure powershell command let's me find the disk encryption type is pmk or cmk. (Note - i am only bothered about pmk and cmk encryption and not other encryption)

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
5,930 questions
Azure Disk Encryption
Azure Disk Encryption
An Azure service for virtual machines (VMs) that helps address organizational security and compliance requirements by encrypting the VM boot and data disks with keys and policies that are controlled in Azure Key Vault.
144 questions
0 comments No comments
{count} votes

Accepted answer
  1. TP 44,386 Reputation points


    Please see sample code below:

    $disk = Get-AzDisk -ResourceGroupName myResourceGroup -Name myDisk

    azure managed disk encryption type powershell sample

    If Type = EncryptionAtRestWithPlatformKey then it is PMK, if Type = EncryptionAtRestWithCustomerKey it is CMK.

    Please click Accept Answer if the above was useful.



    0 comments No comments

0 additional answers

Sort by: Most helpful