This article will discuss the syntax and usage of the Get-AzDisk PowerShell command and provide several examples of its use.
This command helps you to retrieve the properties of a Managed disk.
Table of Contents
Syntax
Get-AzDiskGet-AzDisk -ResourceGroupName] <String>Get-AzDisk -ResourceGroupName <String> -DiskName <String>Examples
Example-1:
You can execute the below Azure PowerShell command to get the properties of all the managed disks under the subscription.
Get-AzDiskAfter executing the above command, I got the below-expected output
ResourceGroupName : DEMO1234
ManagedBy : /subscriptions/1cdf4300-dee5-4518-9c9c-feaa72a5cbd1/resourceGroups/Demo1234/providers/Microsoft.Compute/virtualMachines/
AzureLessonsVM
ManagedByExtended : {}
Sku : Microsoft.Azure.Management.Compute.Models.DiskSku
Zones : {1}
TimeCreated : 14-05-2024 07:37:12
OsType : Linux
HyperVGeneration : V2
CreationData : Microsoft.Azure.Management.Compute.Models.CreationData
DiskSizeGB : 32
DiskSizeBytes : 34359738368
UniqueId : 35aef908-9f87-4c6c-b009-a55f6668c5ae
EncryptionSettingsCollection :
ProvisioningState : Succeeded
DiskIOPSReadWrite : 120
DiskMBpsReadWrite : 25
DiskIOPSReadOnly :
DiskMBpsReadOnly :
DiskState : Reserved
Encryption : Microsoft.Azure.Management.Compute.Models.Encryption
MaxShares :
ShareInfo : {}
Id : /subscriptions/1cdf4300-dee5-4518-9c9c-feaa72a5cbd1/resourceGroups/DEMO1234/providers/Microsoft.Compute/disks/AzureLesso
nsVM_OsDisk_1_35aef9089f874c6cb009a55f6668c5ae
Name : AzureLessonsVM_OsDisk_1_35aef9089f874c6cb009a55f6668c5ae
Type : Microsoft.Compute/disks
Location : eastus
ExtendedLocation :
Tags : {}
NetworkAccessPolicy : AllowAll
DiskAccessId :
Tier : P4
BurstingEnabled :
PurchasePlan :
SupportsHibernation : True
SecurityProfile :
PublicNetworkAccess : Enabled
SupportedCapabilities : Microsoft.Azure.Management.Compute.Models.SupportedCapabilities
DataAccessAuthMode :
CompletionPercent :
ResourceGroupName : DEMO1234
ManagedBy :
ManagedByExtended : {}
Sku : Microsoft.Azure.Management.Compute.Models.DiskSku
Zones : {1}
TimeCreated : 14-05-2024 12:56:20
OsType :
HyperVGeneration :
CreationData : Microsoft.Azure.Management.Compute.Models.CreationData
DiskSizeGB : 4
DiskSizeBytes : 4294967296
UniqueId : bb46d3e1-d22c-4202-ae3f-0aad2d346500
EncryptionSettingsCollection :
ProvisioningState : Succeeded
DiskIOPSReadWrite : 500
DiskMBpsReadWrite : 100
DiskIOPSReadOnly :
DiskMBpsReadOnly :
DiskState : Unattached
Encryption : Microsoft.Azure.Management.Compute.Models.Encryption
MaxShares :
ShareInfo : {}
Id : /subscriptions/1cdf4300-dee5-4518-9c9c-feaa72a5cbd1/resourceGroups/DEMO1234/providers/Microsoft.Compute/disks/testing
Name : testing
Type : Microsoft.Compute/disks
Location : eastus
ExtendedLocation :
Tags : {}
NetworkAccessPolicy : AllowAll
DiskAccessId :
Tier :
BurstingEnabled :
PurchasePlan :
SupportsHibernation :
SecurityProfile :
PublicNetworkAccess : Enabled
SupportedCapabilities :
DataAccessAuthMode : None
CompletionPercent : Example-2:
You can execute the below Azure PowerShell command to get the properties of the specified managed disk under the specified Resource Group.
Get-AzDisk -ResourceGroupName 'DEMO1234' -DiskName 'testing'After executing the above command, I got the expected output, as shown in the screenshot below.

Example-3:
You can execute the Azure PowerShell command below to get the properties of all the managed disks in the specified Resource Group.
Get-AzDisk -ResourceGroupName 'DEMO1234'After executing the above command, I got the expected output, as shown below.

You may also like following the articles below

I am Rajkishore, and I am a Microsoft Certified IT Consultant. I have over 14 years of experience in Microsoft Azure and AWS, with good experience in Azure Functions, Storage, Virtual Machines, Logic Apps, PowerShell Commands, CLI Commands, Machine Learning, AI, Azure Cognitive Services, DevOps, etc. Not only that, I do have good real-time experience in designing and developing cloud-native data integrations on Azure or AWS, etc. I hope you will learn from these practical Azure tutorials. Read more.
