Azure / Azure/azure-powershell

StorageAccountType null for Standard Managed Disk

Open
#5,369 10 comments 0 reactions 2 assignees Assigned to @koralski View on GitHub
act-observability-squad bug Compute - VM Service Attention
Dominant language
C#
Stars
4.8k
Forks
4.3k
Avg merge
2d 17h
Merged PRs (30d)
51

Description

### Cmdlet(s)
Get-AzureRmVM

### PowerShell Version
5.1.16299.98

### Module Version
4.0.1

### OS Version
10.0.16299.98

### Description
I am attempting to pull the Storage Account Type for each Managed Disk on all of my VM's. My script used to work successfully for both Standard and Premium disks but is now failing on Standard disks because the VM.StorageProfile.OsDisk.ManagedDisk.StorageAccountType property is returning null. This still works for Premium disks.

### Script/Steps for Reproduction
$vm = Get-AzureRmVM -ResourceGroupName "RGName" -Name "VM_With_StandardDisk"
$vm.StorageProfile.OsDisk.ManagedDisk.StorageAccountType

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.