@@ -21,8 +21,9 @@ New-AzVirtualNetworkGateway -Name <String> -ResourceGroupName <String> -Location
21
21
[-GatewayDefaultSite <PSLocalNetworkGateway>] [-VpnClientAddressPool <String[]>]
22
22
[-VpnClientProtocol <String[]>] [-VpnClientRootCertificates <PSVpnClientRootCertificate[]>]
23
23
[-VpnClientRevokedCertificates <PSVpnClientRevokedCertificate[]>] [-VpnClientIpsecPolicy <PSIpsecPolicy[]>]
24
- [-Asn <UInt32>] [-PeerWeight <Int32>] [-Tag <Hashtable>] [-Force] [-CustomRoute <String[]>] [-AsJob]
25
- [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
24
+ [-Asn <UInt32>] [-PeerWeight <Int32>] [-Tag <Hashtable>] [-Force] [-CustomRoute <String[]>]
25
+ [-VpnGatewayGeneration <String>] [-AsJob] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
26
+ [<CommonParameters>]
26
27
```
27
28
28
29
### RadiusServerConfiguration
@@ -34,7 +35,7 @@ New-AzVirtualNetworkGateway -Name <String> -ResourceGroupName <String> -Location
34
35
[-VpnClientProtocol <String[]>] [-VpnClientRootCertificates <PSVpnClientRootCertificate[]>]
35
36
[-VpnClientRevokedCertificates <PSVpnClientRevokedCertificate[]>] [-VpnClientIpsecPolicy <PSIpsecPolicy[]>]
36
37
[-Asn <UInt32>] [-PeerWeight <Int32>] [-Tag <Hashtable>] [-Force] -RadiusServerAddress <String>
37
- -RadiusServerSecret <SecureString> [-CustomRoute <String[]>] [-AsJob]
38
+ -RadiusServerSecret <SecureString> [-CustomRoute <String[]>] [-VpnGatewayGeneration <String>] [- AsJob]
38
39
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
39
40
```
40
41
@@ -46,9 +47,9 @@ New-AzVirtualNetworkGateway -Name <String> -ResourceGroupName <String> -Location
46
47
[-GatewayDefaultSite <PSLocalNetworkGateway>] [-VpnClientAddressPool <String[]>]
47
48
[-VpnClientProtocol <String[]>] [-VpnClientRootCertificates <PSVpnClientRootCertificate[]>]
48
49
[-VpnClientRevokedCertificates <PSVpnClientRevokedCertificate[]>] [-VpnClientIpsecPolicy <PSIpsecPolicy[]>]
49
- [-Asn <UInt32>] [-PeerWeight <Int32>] [-Tag <Hashtable>] [-Force] -AadTenantUri <String> -AadAudienceId <String>
50
- -AadIssuerUri <String> [-CustomRoute <String[]>] [-AsJob] [-DefaultProfile <IAzureContextContainer>] [-WhatIf ]
51
- [-Confirm] [<CommonParameters>]
50
+ [-Asn <UInt32>] [-PeerWeight <Int32>] [-Tag <Hashtable>] [-Force] -AadTenantUri <String>
51
+ -AadAudienceId <String> - AadIssuerUri <String> [-CustomRoute <String[]>] [-VpnGatewayGeneration <String> ]
52
+ [-AsJob] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [- Confirm] [<CommonParameters>]
52
53
```
53
54
54
55
## DESCRIPTION
@@ -138,6 +139,25 @@ The above will create a resource group, request a Public IP Address, create a Vi
138
139
subnet and create a Virtual Network Gateway in Azure.
139
140
The gateway will be called "myNGW" within the resource group "vnet-gateway" in the location "UK West" with the previously created IP configurations saved in the variable "ngwIPConfig," the gateway type of "VPN," the vpn type "RouteBased," and the sku "Basic." It also configures AAD authentication configurations: AadTenantUri, AadIssuerUri and AadAudienceId for VpnClient of virtual network gateway.
140
141
142
+ ### 5: Create a Virtual Network Gateway with VpnGatewayGeneration
143
+ ```
144
+ New-AzResourceGroup -Location "UK West" -Name "vnet-gateway"
145
+ $subnet = New-AzVirtualNetworkSubnetConfig -Name 'gatewaysubnet' -AddressPrefix '10.254.0.0/27'
146
+
147
+ $ngwpip = New-AzPublicIpAddress -Name ngwpip -ResourceGroupName "vnet-gateway" -Location "UK West" -AllocationMethod Dynamic
148
+ $vnet = New-AzVirtualNetwork -AddressPrefix "10.254.0.0/27" -Location "UK West" -Name vnet-gateway -ResourceGroupName "vnet-gateway" -Subnet $subnet
149
+ $subnet = Get-AzVirtualNetworkSubnetConfig -name 'gatewaysubnet' -VirtualNetwork $vnet
150
+ $ngwipconfig = New-AzVirtualNetworkGatewayIpConfig -Name ngwipconfig -SubnetId $subnet.Id -PublicIpAddressId $ngwpip.Id
151
+
152
+ New-AzVirtualNetworkGateway -Name myNGW -ResourceGroupName vnet-gateway -Location "UK West" -IpConfigurations $ngwIpConfig -GatewayType "Vpn" -VpnType "RouteBased" -GatewaySku "VpnGw4" -VpnGatewayGeneration "Generation2"
153
+ ```
154
+
155
+ The above will create a resource group, request a Public IP Address, create a Virtual Network and
156
+ subnet and create a Virtual Network Gateway in Azure.
157
+ The gateway will be called "myNGW" within the resource group "vnet-gateway" in the location "UK West"
158
+ with the previously created IP configurations saved in the variable "ngwIPConfig," the
159
+ gateway type of "VPN", the vpn type "RouteBased", the sku "VpnGw4" and VpnGatewayGeneration Generation2 enabled.
160
+
141
161
## PARAMETERS
142
162
143
163
### -AadAudienceId
@@ -308,7 +328,7 @@ Accept wildcard characters: False
308
328
Type : System.String
309
329
Parameter Sets : (All)
310
330
Aliases :
311
- Accepted values : Basic, Standard, HighPerformance, UltraPerformance, VpnGw1, VpnGw2, VpnGw3, VpnGw1AZ, VpnGw2AZ, VpnGw3AZ, ErGw1AZ, ErGw2AZ, ErGw3AZ
331
+ Accepted values : Basic, Standard, HighPerformance, UltraPerformance, VpnGw1, VpnGw2, VpnGw3, VpnGw4, VpnGw5, VpnGw1AZ, VpnGw2AZ, VpnGw3AZ, VpnGw4AZ, VpnGw5AZ , ErGw1AZ, ErGw2AZ, ErGw3AZ
312
332
313
333
Required : False
314
334
Position : Named
@@ -521,6 +541,23 @@ Accept pipeline input: True (ByPropertyName)
521
541
Accept wildcard characters : False
522
542
` ` `
523
543
544
+ ### -VpnGatewayGeneration
545
+ The generation for this VirtualNetwork VPN gateway. Must be None if GatewayType is not VPN.
546
+ Once set, this property cannot be changed over the lifetime of the gateway.
547
+
548
+ ` ` ` yaml
549
+ Type : System.String
550
+ Parameter Sets : (All)
551
+ Aliases :
552
+ Accepted values : None, Generation1, Generation2
553
+
554
+ Required : False
555
+ Position : Named
556
+ Default value : None
557
+ Accept pipeline input : False
558
+ Accept wildcard characters : False
559
+ ` ` `
560
+
524
561
### -VpnType
525
562
526
563
` ` ` yaml
0 commit comments