共用方式為


New-AzExpressRouteGateway

建立可調整的 ExpressRoute 閘道。

語法

ByVirtualHubName (預設值)

New-AzExpressRouteGateway
    -ResourceGroupName <String>
    -Name <String>
    -MinScaleUnits <UInt32>
    -VirtualHubName <String>
    [-MaxScaleUnits <UInt32>]
    [-Tag <Hashtable>]
    [-AsJob]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ByVirtualHubObject

New-AzExpressRouteGateway
    -ResourceGroupName <String>
    -Name <String>
    -MinScaleUnits <UInt32>
    -VirtualHub <PSVirtualHub>
    [-MaxScaleUnits <UInt32>]
    [-Tag <Hashtable>]
    [-AsJob]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ByVirtualHubResourceId

New-AzExpressRouteGateway
    -ResourceGroupName <String>
    -Name <String>
    -MinScaleUnits <UInt32>
    -VirtualHubId <String>
    [-MaxScaleUnits <UInt32>]
    [-Tag <Hashtable>]
    [-AsJob]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

New-AzExpressRouteGateway 會建立可調整的 ExpressRoute 閘道。 這是軟體定義的軟體定義連線,適用於內部部署至 VirtualHub 內的 Azure。

此閘道可以根據此 Cmdlet 或 Set-AzExpressRouteGateway Cmdlet 中指定的縮放單位進行調整。

系統會設定從內部部署 ExpressRoute 線路到可調整閘道的連線。

ExpressRouteGateway 會位於與參考的 VirtualHub 相同的位置。

範例

範例 1

New-AzResourceGroup -Location "West US" -Name "testRG"
$virtualWan = New-AzVirtualWan -ResourceGroupName testRG -Name myVirtualWAN -Location "West US"
$virtualHub = New-AzVirtualHub -VirtualWan $virtualWan -ResourceGroupName "testRG" -Name "westushub" -AddressPrefix "10.0.0.1/24"
New-AzExpressRouteGateway -ResourceGroupName "testRG" -Name "testergw" -VirtualHubId $virtualHub.Id -MinScaleUnits 2
ResourceGroupName   : testRG
Name                : testergw
Id                  : /subscriptions/{subscriptionId}/resourceGroups/testRG/providers/Microsoft.Network/expressRouteGateways/testergw
Location            : West US
MinScaleUnits       : 2
VirtualHub          : /subscriptions/{subscriptionId}/resourceGroups/testRG/providers/Microsoft.Network/virtualHubs/westushub
BgpSettings         : {}
Type                : Microsoft.Network/expressRouteGateways
ProvisioningState   : Succeeded

上述內容會在 Azure 的 「testRG」 資源群組中建立資源群組、虛擬 WAN、虛擬網路、美國西部的虛擬中樞。 之後,將會在具有 2 個縮放單位的虛擬中樞中建立 ExpressRoute 閘道。

範例 2

建立可調整的 ExpressRoute 閘道。 (autogenerated)

New-AzExpressRouteGateway -MaxScaleUnits <UInt32> -MinScaleUnits 2 -Name 'testExpressRoutegw' -ResourceGroupName 'testRG' -Tag @{"tag1"="value1"; "tag2"="value2"} -VirtualHubName <String>

參數

-AsJob

在背景執行 Cmdlet

參數屬性

類型:SwitchParameter
預設值:None
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-Confirm

在執行 Cmdlet 之前,提示您進行確認。

參數屬性

類型:SwitchParameter
預設值:None
支援萬用字元:False
不要顯示:False
別名:參閱

參數集

(All)
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-DefaultProfile

用於與 Azure 通訊的認證、帳戶、租用戶和訂用帳戶。

參數屬性

類型:IAzureContextContainer
預設值:None
支援萬用字元:False
不要顯示:False
別名:AzContext, AzureRmContext, AzureCredential

參數集

(All)
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-MaxScaleUnits

此 ExpressRouteGateway 的縮放單位數目上限。 有效範圍 > 2

參數屬性

類型:UInt32
預設值:None
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-MinScaleUnits

此 ExpressRouteGateway 的縮放單位數目下限。 有效範圍 > 2

參數屬性

類型:UInt32
預設值:None
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:Named
必要:True
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-Name

資源名稱。

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False
別名:資源名稱, ExpressRouteGatewayName

參數集

(All)
Position:Named
必要:True
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-ResourceGroupName

資源名稱。

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:Named
必要:True
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-Tag

代表資源標籤的雜湊表。

參數屬性

類型:Hashtable
預設值:None
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-VirtualHub

此 VpnGateway 需要與之關聯的 VirtualHub。

參數屬性

類型:PSVirtualHub
預設值:None
支援萬用字元:False
不要顯示:False

參數集

ByVirtualHubObject
Position:Named
必要:True
來自管線的值:True
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-VirtualHubId

此 VpnGateway 需要關聯的 VirtualHub 標識碼。

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False

參數集

ByVirtualHubResourceId
Position:Named
必要:True
來自管線的值:False
來自管線按屬性名稱的值:True
來自剩餘引數的值:False

-VirtualHubName

此 VpnGateway 需要關聯的 VirtualHub 標識碼。

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False

參數集

ByVirtualHubName
Position:Named
必要:True
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-WhatIf

顯示 Cmdlet 執行時會發生什麼事。 指令未執行。

參數屬性

類型:SwitchParameter
預設值:None
支援萬用字元:False
不要顯示:False
別名:威斯康星州

參數集

(All)
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

CommonParameters

此 Cmdlet 支援常見參數:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 如需詳細資訊,請參閱 about_CommonParameters

輸入

PSVirtualHub

String

輸出

PSExpressRouteGateway