Get-AzComputeResourceSku [-Location parameter missing]
PS version: 5.2.0
Cmdlet: Get-AzComputeResourceSku
Scenario: filter the results by location.
Issue: As per the documentation, it should be possible to filter the -Location parameter, but the cmdlet is not recognizing this parameter.
Thank you.
Could you check your module version? The latest version seems work.
PS C:\> $PSVersionTable
Name Value
---- -----
PSVersion 5.1.19041.610
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.19041.610
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
PS C:\> Get-AzComputeResourceSku -Location westus
ResourceType Name Location Zones Restriction Capability Value
------------ ---- -------- ----- ----------- ---------- -----
availabilitySets Classic westus MaximumPlatformFaultDomainCount 3
availabilitySets Aligned westus MaximumPlatformFaultDomainCount 3
disks Standard_LRS westus MaxSizeGiB 32
disks Standard_LRS westus MaxSizeGiB 64
......
PS C:\> get-module Az.Compute
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Script 4.7.0 Az.Compute {Add-AzContainerServiceAgentPoolProfile, Add-AzImageDataDisk, Add-AzVhd, Add-AzVMAdditionalUnattendContent...}
Hello, thank you for the reply. Looks like am using an older version and that may be the cause. I remember that I recently updated my azure module though. Not sure why it's still using the older thing.
PS H:> $PSVersionTable
Name Value
PSVersion 5.1.17763.1490 PSEdition Desktop PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} BuildVersion 10.0.17763.1490 CLRVersion 4.0.30319.42000 WSManStackVersion 3.0 PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1
PS H:> Get-AzComputeResourceSku -Location centralus Get-AzComputeResourceSku : A parameter cannot be found that matches parameter name 'Location'. At line:1 char:26
- Get-AzComputeResourceSku -Location centralus
-
~~~~~~~~~- CategoryInfo : InvalidArgument: (:) [Get-AzComputeResourceSku], ParameterBindingException
- FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.Azure.Commands.Compute.Automation.GetAzureRmComputeResourceSku
PS H:> Get-AzComputeResourceSku -Location westus Get-AzComputeResourceSku : A parameter cannot be found that matches parameter name 'Location'. At line:1 char:26
- Get-AzComputeResourceSku -Location westus
-
~~~~~~~~~- CategoryInfo : InvalidArgument: (:) [Get-AzComputeResourceSku], ParameterBindingException
- FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.Azure.Commands.Compute.Automation.GetAzureRmComputeResourceSku
PS H:> Get-module Az.Compute
ModuleType Version Name ExportedCommands
Script 2.4.1 Az.Compute {Add-AzContainerServiceAgentPoolProfile, Add-AzImageDataDisk, Add-AzVhd, Add-AzVMAdditionalUnattendContent...}