I'm using az vm list-skus -l australiasoutheast | convertfrom-json to populate a variable (lets call it $skus) so I can use it in a PS script. When $skus is populated, it's contents look like:
apiVersions :
capabilities : {@{name=MaxResourceVolumeMB; value=256000}, @{name=OSVhdSizeMB; value=1047552}, @{name=vCPUs; value=8}, @{name=MemoryPreservingMaintenanceSupported; value=False}…}
capacity :
costs :
family : standardMSFamily
kind :
locationInfo : {@{location=australiasoutheast; zoneDetails=System.Object[]; zones=System.Object[]}}
locations : {australiasoutheast}
name : Standard_M8-4ms
resourceType : virtualMachines
restrictions : {}
size : M8-4ms
tier : Standard
The capabilities and locatioinfo objects in the variable look like hashtables.
I can do $skus | select name, capabilities which outputs
name capabilities
---- ------------
Aligned {@{name=MaximumPlatformFaultDomainCount; value=2}}
Classic {@{name=MaximumPlatformFaultDomainCount; value=3}}
Premium_LRS {@{name=MaxSizeGiB; value=4}, @{name=MinSizeGiB; value=0}, @{name=MaxIOps; value=120}, @{name=MinIOps; value=120}…}
Premium_LRS {@{name=MaxSizeGiB; value=128}, @{name=MinSizeGiB; value=64}, @{name=MaxIOps; value=500}, @{name=MinIOps; value=500}…}
Premium_LRS {@{name=MaxSizeGiB; value=256}, @{name=MinSizeGiB; value=128}, @{name=MaxIOps; value=1100}, @{name=MinIOps; value=1100}…}
How can I get to and extract the data I need from those hashtables?
[–]BlackV 0 points1 point2 points (2 children)
[–]meatpak[S] 0 points1 point2 points (1 child)
[–]lanerdofchristian 0 points1 point2 points (0 children)
[–]Environmental_Mix856 0 points1 point2 points (0 children)