Get-AzComputeResourceSku
List all compute resource Skus
Syntax
Default (Default)
Get-AzComputeResourceSku
[[-Location] <String>]
[-EdgeZone <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
List all compute resource Skus
Examples
Example 1
Get-AzComputeResourceSku "westus";
List all compute resource skus in West US region
Example 2
Get-AzComputeResourceSku -Location "westus" | Where-Object {
$_.Name -like 'Standard_A*' -and
([int]($_.Capabilities | Where-Object { $_.Name -eq 'vCPUs' }).Value) -le 4
} | Select-Object -ExpandProperty Name
Standard_A0
Standard_A1
Standard_A1_v2
Standard_A2
Standard_A2m_v2
Standard_A2_v2
Standard_A3
Standard_A4m_v2
Standard_A4_v2
Standard_A5
Standard_A6
Get all compute resource skus in West US region, filter by name and vCPUs capability, and select the name property.
Example 3
$vmSizes = Get-AzComputeResourceSku -Location "WestUS" | Where-Object {
$_.ResourceType -eq "virtualMachines" -and
([int]($_.Capabilities | Where-Object { $_.Name -eq "vCPUs" }).Value) -ge 4 -and
([int]($_.Capabilities | Where-Object { $_.Name -eq "MaxDataDiskCount" }).Value) -ge 8
}
$vmSizes.count
812
Get all compute resource skus in West US region, filter by resource type, vCPUs capability, and MaxDataDiskCount capability, and count the number of results.
Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Parameter properties
| Type: | IAzureContextContainer |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | AzContext, AzureRmContext, AzureCredential |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-EdgeZone
Sets the edge zone name. If set, the query will be routed to the specified edgezone instead of the main region.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | True |
| Value from remaining arguments: | False |
-Location
Specifies a location of the available skus to list.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | 0 |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | True |
| Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.