使用Get-AzLocation选择特定Azure位置
我正试图找到一种使用Azure PowerShell选择目标Azure位置(对象)的方法 这给了我一个位置列表:使用Get-AzLocation选择特定Azure位置,azure,powershell,Azure,Powershell,我正试图找到一种使用Azure PowerShell选择目标Azure位置(对象)的方法 这给了我一个位置列表: Get-AzLocation | select DisplayName, Location | Format-Table 我如何选择其中的一个,比如 $Location = Get-AzLocation -Something "South Central US" 您可以使用在DisplayName上进行筛选: ❯ Get-AzLocation | Where-
Get-AzLocation | select DisplayName, Location | Format-Table
我如何选择其中的一个,比如
$Location = Get-AzLocation -Something "South Central US"
您可以使用在DisplayName
上进行筛选:
❯ Get-AzLocation | Where-Object {$_.DisplayName -eq "South Central US"}
Location : southcentralus
DisplayName : South Central US
Providers : {Microsoft.Automation, Microsoft.Storage, Microsoft.Network, Microsoft.Compute…}
这将返回一个类型为的对象。已确认,有效。谢谢你。