I have been trying to create a script that can get a list of all managed disks in Azure, which includie vmname, diskname, size, OSType and resource group name and more importantly free space and available disk space remaining.
I can get the basic information using Powershell, however I can't seem to get current disk usage and free space remaining, I was hoping some guidance or point in the right direction.
$vms = Get-AzureRmVM
foreach ($vm in $vms) {
Get-AzureRmDisk | select -Property $vm.Name,Name,DiskSizeGB,OSType,ResourceGroupName
}
Thanks in advance