Skip to content

Commit a1c8933

Browse files
Nilambarianton-evseev
authored andcommitted
Update/fix help files
1 parent 45a074d commit a1c8933

File tree

2 files changed

+111
-7
lines changed

2 files changed

+111
-7
lines changed

src/Network/Network/help/New-AzVirtualNetworkGateway.md

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ The above will create a resource group, request a Public IP Address, create a Vi
100100
subnet and create a Virtual Network Gateway in Azure.
101101
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 adds an external radius server with address "TestRadiusServer". It will also set custom routes specified by customers on gateway.
102102

103-
### 1: Create a Virtual Network Gateway with P2S settings
103+
### 3: Create a Virtual Network Gateway with P2S settings
104104
```
105105
New-AzResourceGroup -Location "UK West" -Name "vnet-gateway"
106106
$subnet = New-AzVirtualNetworkSubnetConfig -Name 'gatewaysubnet' -AddressPrefix '10.254.0.0/27'
@@ -120,10 +120,30 @@ subnet and create a Virtual Network Gateway with P2S settings e.g. VpnProtocol,V
120120
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 "VpnGw1." Vpn settings will be set on Gateway such as VpnProtocol set as Ikev2, VpnClientAddressPool as "201.169.0.0/16", VpnClientRootCertificate set as passed one: clientRootCertName and custom vpn ipsec policy passed in object:$vpnclientipsecpolicy
121121
It will also set custom routes specified by customers on gateway.
122122

123+
### 4: Create a Virtual Network Gateway with AAD authentication Configuration for VpnClient of virtual network gateway.
124+
```
125+
New-AzResourceGroup -Location "UK West" -Name "vnet-gateway"
126+
New-AzVirtualNetworkSubnetConfig -Name 'gatewaysubnet' -AddressPrefix '10.254.0.0/27'
127+
128+
$ngwpip = New-AzPublicIpAddress -Name ngwpip -ResourceGroupName "vnet-gateway" -Location "UK West" -AllocationMethod Dynamic
129+
$vnet = New-AzVirtualNetwork -AddressPrefix "10.254.0.0/27" -Location "UK West" -Name vnet-gateway -ResourceGroupName "vnet-gateway" -Subnet $subnet
130+
$subnet = Get-AzVirtualNetworkSubnetConfig -name 'gatewaysubnet' -VirtualNetwork $vnet
131+
$ngwipconfig = New-AzVirtualNetworkGatewayIpConfig -Name ngwipconfig -SubnetId $subnet.Id -PublicIpAddressId $ngwpip.Id
132+
$Secure_String_Pwd = ConvertTo-SecureString "TestRadiusServerPassword" -AsPlainText -Force
133+
134+
New-AzVirtualNetworkGateway -Name myNGW -ResourceGroupName vnet-gateway -Location "UK West" -IpConfigurations $ngwIpConfig -GatewayType "Vpn" -VpnType "RouteBased" -GatewaySku "VpnGw1" -VpnClientProtocol OpenVPN -VpnClientAddressPool 201.169.0.0/16 -AadTenant "https://login.microsoftonline.com/0ab2c4f4-81e6-44cc-a0b2-b3a47a1443f4" -AadIssuer "https://sts.windows.net/0ab2c4f4-81e6-44cc-a0b2-b3a47a1443f4/" -AadAudience "a21fce82-76af-45e6-8583-a08cb3b956f9"
135+
```
136+
137+
The above will create a resource group, request a Public IP Address, create a Virtual Network and
138+
subnet and create a Virtual Network Gateway in Azure.
139+
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: AADTenant, AADIssuer and AADAudience for Vpnclient of virtual network gateway.
140+
123141
## PARAMETERS
124142

125143
### -AadAudience
126-
P2S AAD authentication option:AADAudience.```yaml
144+
P2S AAD authentication option:AADAudience.
145+
146+
```yaml
127147
Type: System.String
128148
Parameter Sets: AadAuthenticationConfiguration
129149
Aliases:
@@ -136,7 +156,9 @@ Accept wildcard characters: False
136156
```
137157
138158
### -AadIssuer
139-
P2S AAD authentication option:AADIssuer.```yaml
159+
P2S AAD authentication option:AADIssuer.
160+
161+
```yaml
140162
Type: System.String
141163
Parameter Sets: AadAuthenticationConfiguration
142164
Aliases:
@@ -149,7 +171,9 @@ Accept wildcard characters: False
149171
```
150172
151173
### -AadTenant
152-
P2S AAD authentication option:AADTenant.```yaml
174+
P2S AAD authentication option:AADTenant.
175+
176+
```yaml
153177
Type: System.String
154178
Parameter Sets: AadAuthenticationConfiguration
155179
Aliases:

src/Network/Network/help/Set-AzVirtualNetworkGateway.md

Lines changed: 83 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,10 +151,86 @@ BgpSettings : {
151151
The first command gets a virtual network gateway named Gateway01 that belongs to resource group ResourceGroup001 and stores it to the variable named $Gateway
152152
The second command updates the virtual network gateway Gateway01 with the tags @{ testtagKey="SomeTagKey"; testtagValue="SomeKeyValue" }.
153153

154+
### Example 4: Add/Update AAD authentication configuration for VpnClient of an existing virtual network gateway
155+
```
156+
PS C:\>$Gateway = Get-AzVirtualNetworkGateway -ResourceGroupName "ResourceGroup001" -Name "Gateway001"
157+
PS C:\>Set-AzVirtualNetworkGateway -VirtualNetworkGateway $Gateway -AadTenant "https://login.microsoftonline.com/0ab2c4f4-81e6-44cc-a0b2-b3a47a1443f4" -AadIssuer "https://sts.windows.net/0ab2c4f4-81e6-44cc-a0b2-b3a47a1443f4/" -AadAudience "a21fce82-76af-45e6-8583-a08cb3b956f9"
158+
159+
Name : Gateway001
160+
ResourceGroupName : ResourceGroup001
161+
Location : westus
162+
Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup001/providers/Microsoft.Network/virtualNetworkGateways/Gateway001
163+
Etag : W/"00000000-0000-0000-0000-000000000000"
164+
ResourceGuid : 00000000-0000-0000-0000-000000000000
165+
ProvisioningState : Succeeded
166+
Tags :
167+
Name Value
168+
============ ============
169+
testtagValue SomeKeyValue
170+
testtagKey SomeTagKey
171+
172+
IpConfigurations : [
173+
{
174+
"PrivateIpAllocationMethod": "Dynamic",
175+
"Subnet": {
176+
"Id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup001/providers/Microsoft.Network/virtualNetworks/MyVnet/subnets/GatewaySubnet"
177+
},
178+
"PublicIpAddress": {
179+
"Id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup001/providers/Microsoft.Network/publicIPAddresses/Gateway001Ip"
180+
},
181+
"Name": "vng1ipConfig",
182+
"Etag": "W/\"00000000-0000-0000-0000-000000000000\"",
183+
"Id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup001/providers/Microsoft.Network/virtualNetworkGateways/Gateway001/ipConfigurations/Gateway001IpConfig"
184+
}
185+
]
186+
GatewayType : Vpn
187+
VpnType : RouteBased
188+
EnableBgp : False
189+
ActiveActive : False
190+
GatewayDefaultSite : null
191+
Sku : {
192+
"Capacity": 2,
193+
"Name": "VpnGw1",
194+
"Tier": "VpnGw1"
195+
}
196+
vpnClientConfiguration : {
197+
"vpnClientProtocols": [
198+
"OpenVPN"
199+
],
200+
201+
"vpnClientAddressPool": {
202+
"addressPrefixes": [
203+
"101.10.0.0/16"
204+
]
205+
},
206+
"vpnClientRootCertificates": "",
207+
"vpnClientRevokedCertificates": "",
208+
209+
"radiusServerAddress": "",
210+
"radiusServerSecret": "",
211+
"aadTenant": "https://login.microsoftonline.com/0ab2c4f4-81e6-44cc-a0b2-b3a47a1443f4\",
212+
"aadAudience": "a21fce82-76af-45e6-8583-a08cb3b956g9\",
213+
"aadIssuer": "https://sts.windows.net/0ab2c4f4-81e6-44cc-a0b2-b3a47a1443f4/\"
214+
},
215+
BgpSettings : {
216+
"Asn": 65515,
217+
"BgpPeeringAddress": "1.2.3.4",
218+
"PeerWeight": 0
219+
}
220+
221+
PS C:\>Set-AzVirtualNetworkGateway -VirtualNetworkGateway $Gateway -VpnClientRootCertificates $rootCert -RemoveAadAuthentication
222+
```
223+
224+
The first command gets a virtual network gateway named Gateway01 that belongs to resource group ResourceGroup001 and stores it to the variable named $Gateway
225+
The second command updates the virtual network gateway Gateway01 with the AAD authentication configurations params:aadTenant, aadAudience, aadIssuer for VpnClient.
226+
The third command removes the AAD authentication configuration from VpnClient of virtual network gateway.
227+
154228
## PARAMETERS
155229

156230
### -AadAudience
157-
P2S AAD authentication option:AADAudience.```yaml
231+
P2S AAD authentication option:AADAudience.
232+
233+
```yaml
158234
Type: System.String
159235
Parameter Sets: AadAuthenticationConfiguration
160236
Aliases:
@@ -167,7 +243,9 @@ Accept wildcard characters: False
167243
```
168244
169245
### -AadIssuer
170-
P2S AAD authentication option:AADIssuer.```yaml
246+
P2S AAD authentication option:AADIssuer.
247+
248+
```yaml
171249
Type: System.String
172250
Parameter Sets: AadAuthenticationConfiguration
173251
Aliases:
@@ -180,7 +258,9 @@ Accept wildcard characters: False
180258
```
181259
182260
### -AadTenant
183-
P2S AAD authentication option:AADTenant.```yaml
261+
P2S AAD authentication option:AADTenant.
262+
263+
```yaml
184264
Type: System.String
185265
Parameter Sets: AadAuthenticationConfiguration
186266
Aliases:

0 commit comments

Comments
 (0)