Skip to content

Commit 1c5546e

Browse files
committed
Update from PG
1 parent 7a39e22 commit 1c5546e

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

articles/vpn-gateway/vpn-gateway-create-site-to-site-rm-powershell.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,11 @@ Select-AzSubscription -SubscriptionId $subscription2
105105
$local = Get-AzLocalNetworkGateway -Name Site1 -ResourceGroupName TestRG1
106106
```
107107

108-
For the VirtualNetworkGateway that resides in Tenant2, Subscription2, use the following commands. Adjust any variables to match your environment.
108+
For the VirtualNetworkGateway that resides in Tenant 1, Subscription 1, use the following commands. Adjust any variables to match your environment.
109109

110110
```azurepowershell-interactive
111-
Select-AzSubscription -SubscriptionId $subscription2
111+
Connect-AzAccount -TenantID $Tenant1
112+
Select-AzSubscription -SubscriptionId $subscription1
112113
$gateway1 = Get-AzVirtualNetworkGateway -Name VNet1GW -ResourceGroupName TestRG1
113114
New-AzVirtualNetworkGatewayConnection -Name VNet1toSite1 -ResourceGroupName TestRG1 -Location 'East US' -VirtualNetworkGateway1 $gateway1 -LocalNetworkGateway2 $local -ConnectionType IPsec -SharedKey 'abc123'
114115
```

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

Lines changed: 4 additions & 4 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: 03/25/2025
9+
ms.date: 03/26/2025
1010
ms.author: cherylmc
1111
---
1212
# Configure a VNet-to-VNet VPN gateway connection using PowerShell
@@ -463,8 +463,8 @@ $vnet1gw = Get-AzVirtualNetworkGateway -Name $GWName1 -ResourceGroupName $RG1
463463
When you create and configure TestVNet5 gateway, you need to connect to Tenant1, Subscription1 using the following commands, adjusting any variables as needed.
464464

465465
```azurepowershell-interactive
466-
Connect-AzAccount -TenantID $Tenant2
467-
Select-AzSubscription -SubscriptionId $subscription2
466+
Connect-AzAccount -TenantID $Tenant1
467+
Select-AzSubscription -SubscriptionId $subscription1
468468
$vnet5gw = Get-AzVirtualNetworkGateway -Name $GWName5 -ResourceGroupName $RG1
469469
```
470470

@@ -473,7 +473,7 @@ $vnet5gw = Get-AzVirtualNetworkGateway -Name $GWName5 -ResourceGroupName $RG1
473473
```azurepowershell-interactive
474474
Connect-AzAccount -TenantID $Tenant2
475475
Select-AzSubscription -SubscriptionId $subscription2
476-
$vnet1gw = Get-AzVirtualNetworkGateway -Name $GWName1 -ResourceGroupName $RG1
476+
$vnet5gw = Get-AzVirtualNetworkGateway -Name $GWName1 -ResourceGroupName $RG1
477477
New-AzVirtualNetworkGatewayConnection -Name $Connection51 -ResourceGroupName $RG5 -VirtualNetworkGateway1 $vnet5gw -VirtualNetworkGateway2 $vnet1gw -Location $Location5 -ConnectionType Vnet2Vnet -SharedKey 'AzureA1b2C3'
478478
```
479479

0 commit comments

Comments
 (0)