Get-AzVirtualWan
取得資源群組或訂用帳戶中的虛擬 WAN 或所有虛擬 WAN。
語法
Get-AzVirtualWan
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzVirtualWan
[-ResourceGroupName <String>]
[-Name <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
取得資源群組或訂用帳戶中的虛擬 WAN 或所有虛擬 WAN。
範例
範例 1
New-AzResourceGroup -Location "West US" -Name "testRG"
New-AzVirtualWan -ResourceGroupName "testRG" -Name "myVirtualWAN" -Location "West US" -AllowBranchToBranchTraffic
Get-AzVirtualWan -Name "myVirtualWAN" -ResourceGroupName "testRG"
Name : myVirtualWAN
Id : /subscriptions/{SubscriptionId}/resourceGroups/testRG/providers/Microsoft.Network/virtualWans/myVirtualWAN
AllowVnetToVnetTraffic : False
AllowBranchToBranchTraffic : True
Location : West US
Type : Microsoft.Network/virtualWans
ProvisioningState : Succeeded
此命令會取得資源群組 testRG 中名為 myVirtualWAN 的虛擬 WAN。
範例 2
Get-AzVirtualWan -Name test*
Name : test1
Id : /subscriptions/{SubscriptionId}/resourceGroups/testRG/providers/Microsoft.Network/virtualWans/test1
AllowVnetToVnetTraffic : False
AllowBranchToBranchTraffic : True
Location : West US
Type : Microsoft.Network/virtualWans
ProvisioningState : Succeeded
Name : test2
Id : /subscriptions/{SubscriptionId}/resourceGroups/testRG/providers/Microsoft.Network/virtualWans/test2
AllowVnetToVnetTraffic : False
AllowBranchToBranchTraffic : True
Location : West US
Type : Microsoft.Network/virtualWans
ProvisioningState : Succeeded
此命令會從 「test」 開始取得所有虛擬 WAN。
參數
-DefaultProfile
用於與 Azure 通訊的認證、帳戶、租用戶和訂用帳戶。
類型: | IAzureContextContainer |
別名: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-Name
資源名稱。
類型: | String |
別名: | ResourceName |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | True |
-ResourceGroupName
資源組名。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | True |
輸入
None