Skip to content

Commit bb9887f

Browse files
Merge pull request #287291 from cherylmc/rm-ps
VPN Gateway SFI
2 parents 8a3bc4b + b299090 commit bb9887f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

articles/vpn-gateway/vpn-gateway-vnet-vnet-rm-ps.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ author: cherylmc
66
ms.service: azure-vpn-gateway
77
ms.custom: devx-track-azurepowershell
88
ms.topic: how-to
9-
ms.date: 07/11/2024
9+
ms.date: 09/24/2024
1010
ms.author: cherylmc
1111
---
1212
# Configure a VNet-to-VNet VPN gateway connection using PowerShell
@@ -398,7 +398,7 @@ In this example, because the gateways are in the different subscriptions, we've
398398
PS D:\> $vnet1gw.Name
399399
VNet1GW
400400
PS D:\> $vnet1gw.Id
401-
/subscriptions/b636ca99-6f88-4df4-a7c3-2f8dc4545509/resourceGroupsTestRG1/providers/Microsoft.Network/virtualNetworkGateways/VNet1GW
401+
/subscriptions/aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e/resourceGroupsTestRG1/providers/Microsoft.Network/virtualNetworkGateways/VNet1GW
402402
```
403403

404404
1. **[Subscription 5]** Get the virtual network gateway for Subscription 5. Sign in and connect to Subscription 5 before running the following example:
@@ -420,7 +420,7 @@ In this example, because the gateways are in the different subscriptions, we've
420420
PS C:\> $vnet5gw.Name
421421
VNet5GW
422422
PS C:\> $vnet5gw.Id
423-
/subscriptions/66c8e4f1-ecd6-47ed-9de7-7e530de23994/resourceGroups/TestRG5/providers/Microsoft.Network/virtualNetworkGateways/VNet5GW
423+
/subscriptions/bbbb1b1b-cc2c-dd3d-ee4e-ffffff5f5f5f/resourceGroups/TestRG5/providers/Microsoft.Network/virtualNetworkGateways/VNet5GW
424424
```
425425

426426
1. **[Subscription 1]** Create the TestVNet1 to TestVNet5 connection. In this step, you create the connection from TestVNet1 to TestVNet5. The difference here is that $vnet5gw can't be obtained directly because it is in a different subscription. You'll need to create a new PowerShell object with the values communicated from Subscription 1 in the previous steps. Use the following example. Replace the Name, ID, and shared key with your own values. The important thing is that the shared key must match for both connections. Creating a connection can take a short while to complete.
@@ -430,7 +430,7 @@ In this example, because the gateways are in the different subscriptions, we've
430430
```azurepowershell-interactive
431431
$vnet5gw = New-Object -TypeName Microsoft.Azure.Commands.Network.Models.PSVirtualNetworkGateway
432432
$vnet5gw.Name = "VNet5GW"
433-
$vnet5gw.Id = "/subscriptions/66c8e4f1-ecd6-47ed-9de7-7e530de23994/resourceGroups/TestRG5/providers/Microsoft.Network/virtualNetworkGateways/VNet5GW"
433+
$vnet5gw.Id = "/subscriptions/bbbb1b1b-cc2c-dd3d-ee4e-ffffff5f5f5f/resourceGroups/TestRG5/providers/Microsoft.Network/virtualNetworkGateways/VNet5GW"
434434
$Connection15 = "VNet1toVNet5"
435435
New-AzVirtualNetworkGatewayConnection -Name $Connection15 -ResourceGroupName $RG1 -VirtualNetworkGateway1 $vnet1gw -VirtualNetworkGateway2 $vnet5gw -Location $Location1 -ConnectionType Vnet2Vnet -SharedKey 'AzureA1b2C3'
436436
```
@@ -442,7 +442,7 @@ In this example, because the gateways are in the different subscriptions, we've
442442
```azurepowershell-interactive
443443
$vnet1gw = New-Object -TypeName Microsoft.Azure.Commands.Network.Models.PSVirtualNetworkGateway
444444
$vnet1gw.Name = "VNet1GW"
445-
$vnet1gw.Id = "/subscriptions/b636ca99-6f88-4df4-a7c3-2f8dc4545509/resourceGroups/TestRG1/providers/Microsoft.Network/virtualNetworkGateways/VNet1GW "
445+
$vnet1gw.Id = "/subscriptions/aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e/resourceGroups/TestRG1/providers/Microsoft.Network/virtualNetworkGateways/VNet1GW "
446446
$Connection51 = "VNet5toVNet1"
447447
New-AzVirtualNetworkGatewayConnection -Name $Connection51 -ResourceGroupName $RG5 -VirtualNetworkGateway1 $vnet5gw -VirtualNetworkGateway2 $vnet1gw -Location $Location5 -ConnectionType Vnet2Vnet -SharedKey 'AzureA1b2C3'
448448
```

0 commit comments

Comments
 (0)