Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get-LabAzureAvailableRoleSize -Location 'westeurope' Returns No Results #1260

Closed
shurick81 opened this issue Jan 21, 2022 · 2 comments · Fixed by #1266
Closed

Get-LabAzureAvailableRoleSize -Location 'westeurope' Returns No Results #1260

shurick81 opened this issue Jan 21, 2022 · 2 comments · Fixed by #1266
Assignees

Comments

@shurick81
Copy link

Description

Get-LabAzureAvailableRoleSize -Location 'westeurope' returns no results.

Expected behavior

VM size listed

Actual behavior

No output

Steps to reproduce

Connect-AzAccount
Set-AzContext -Tenant 85173d93-99ef-4dff-9b45-495719659133
Get-LabAzureAvailableRoleSize -Location 'westeurope'

Environment details

@shurick81
Copy link
Author

The problem is that in line

$azLocation = Get-AzLocation | Where-Object -Property DisplayName -eq $Location
it compares the Location parameter with AzLocation DisplayName.

Since location id might be more commonly used by developers, it might be sensible to use one of these two approaches:
Location

$azLocation = Get-AzLocation | Where-Object -Property Location -eq $Location
$azLocation = Get-AzLocation | Where-Object {$_.Location -eq $Location -or $_.DisplayName -eq $Location}

@nyanhp
Copy link
Member

nyanhp commented Jan 27, 2022

While it is documented that the display name needs to be used, I've updated the cmdlet to support both a DisplayName as well as a Location parameter. You can access the development version while we prepare for our next release: https://ci.appveyor.com/project/nyanhp/automatedlab/builds/42360026/job/361cv9j61hcdk0du/artifacts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants