New-AzExpressRouteGateway
Creates a Scalable ExpressRoute Gateway.
Note
This is the previous version of our documentation. Please consult the most recent version for up-to-date information.
Syntax
New-AzExpressRouteGateway
-ResourceGroupName <String>
-Name <String>
-MinScaleUnits <UInt32>
[-MaxScaleUnits <UInt32>]
-VirtualHubName <String>
[-Tag <Hashtable>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzExpressRouteGateway
-ResourceGroupName <String>
-Name <String>
-MinScaleUnits <UInt32>
[-MaxScaleUnits <UInt32>]
-VirtualHub <PSVirtualHub>
[-Tag <Hashtable>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzExpressRouteGateway
-ResourceGroupName <String>
-Name <String>
-MinScaleUnits <UInt32>
[-MaxScaleUnits <UInt32>]
-VirtualHubId <String>
[-Tag <Hashtable>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
New-AzExpressRouteGateway creates a scalable ExpressRoute Gateway. This is software defined connectivity for on premise to Azure inside the VirtualHub.
This gateway can be scaled based on the scale unit specified in this or the Set-AzExpressRouteGateway cmdlet.
A connection is set up from a on-premise ExpressRoute circuit to the scalable gateway.
The ExpressRouteGateway will be in the same location as the referenced VirtualHub.
Examples
Example 1
PS C:\> New-AzResourceGroup -Location "West US" -Name "testRG"
PS C:\> $virtualWan = New-AzVirtualWan -ResourceGroupName testRG -Name myVirtualWAN -Location "West US"
PS C:\> $virtualHub = New-AzVirtualHub -VirtualWan $virtualWan -ResourceGroupName "testRG" -Name "westushub" -AddressPrefix "10.0.0.1/24"
PS C:\> 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
The above will create a resource group, Virtual WAN, Virtual Network, Virtual Hub in West US in "testRG" resource group in Azure. An ExpressRoute gateway will be created thereafter in the Virtual Hub with 2 scale units.
Example 2
Creates a Scalable ExpressRoute Gateway. (autogenerated)
New-AzExpressRouteGateway -MaxScaleUnits <UInt32> -MinScaleUnits 2 -Name 'testExpressRoutegw' -ResourceGroupName 'testRG' -Tag @{"tag1"="value1"; "tag2"="value2"} -VirtualHubName <String>
Parameters
Run cmdlet in the background
| Type: | SwitchParameter |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Prompts you for confirmation before running the cmdlet.
| Type: | SwitchParameter |
| Aliases: | cf |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The credentials, account, tenant, and subscription used for communication with Azure.
| Type: | IAzureContextContainer |
| Aliases: | AzContext, AzureRmContext, AzureCredential |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The maximum number of scale units for this ExpressRouteGateway. Valid range > 2
| Type: | UInt32 |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The minimum number of scale units for this ExpressRouteGateway. Valid range > 2
| Type: | UInt32 |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The resource name.
| Type: | String |
| Aliases: | ResourceName, ExpressRouteGatewayName |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The resource name.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
A hashtable which represents resource tags.
| Type: | Hashtable |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The VirtualHub this VpnGateway needs to be associated with.
| Type: | PSVirtualHub |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
The Id of the VirtualHub this VpnGateway needs to be associated with.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
The Id of the VirtualHub this VpnGateway needs to be associated with.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Shows what would happen if the cmdlet runs. The cmdlet is not run.
| Type: | SwitchParameter |
| Aliases: | wi |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |