Skip to content

Commit bee4f39

Browse files
committed
more fixes
1 parent d92c449 commit bee4f39

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

articles/storage/files/storage-files-configure-s2s-vpn.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -64,23 +64,24 @@ To add a new or existing virtual network to your storage account, follow these s
6464
Connect-AzAccount
6565
```
6666

67-
1. If you want to add a new virtual network and gateway subnet, run the following script. If you have an existing virtual network that you want to use, then skip this step and proceed to step 3. Be sure to replace `<your-subscription-id>`, `<resource-group>`, and `<storage-account-name>` with your own values. If desired, provide your own values for `$location`, `$vnetName`, and `$subnetName`. The `-AddressPrefix` parameter defines the IP address blocks for the virtual network and the subnet, so replace those with your respective values.
67+
1. If you want to add a new virtual network and gateway subnet, run the following script. If you have an existing virtual network that you want to use, then skip this step and proceed to step 3. Be sure to replace `<your-subscription-id>`, `<resource-group>`, and `<storage-account-name>` with your own values. If desired, provide your own values for `$location` and `$vnetName`. The `-AddressPrefix` parameter defines the IP address blocks for the virtual network and the subnet, so replace those with your respective values.
6868

6969
```azurepowershell-interactive
7070
# Select subscription
7171
$subscriptionId = "<your-subscription-id>"
72-
Select-AzSubscription -SubscriptionId $subscriptionId
73-
74-
# Set current storage account
75-
Set-AzCurrentStorageAccount -ResourceGroupName "<resource-group>" -Name "<storage-account-name>"
72+
Select-AzSubscription -SubscriptionId $subscriptionId
7673
77-
# Define parameters
74+
# Define parameters
75+
$storageAccount = "<storage-account-name>"
7876
$resourceGroup = "<resource-group>"
7977
$location = "East US"
8078
$vnetName = "myVNet"
8179
# Virtual network gateway can only be created in subnet with name 'GatewaySubnet'.
8280
$subnetName = "GatewaySubnet"
83-
81+
82+
# Set current storage account
83+
Set-AzCurrentStorageAccount -ResourceGroupName "<resource-group>" -Name $storageAccount
84+
8485
# Define subnet configuration
8586
$subnetConfig = New-AzVirtualNetworkSubnetConfig -Name $subnetName -AddressPrefix 10.0.0.0/24
8687
@@ -126,7 +127,7 @@ To add a new or existing virtual network to your storage account, follow these s
126127
Update-AzStorageAccountNetworkRuleSet -ResourceGroupName $resourceGroup -Name $storageAccount -DefaultAction Deny
127128
```
128129

129-
1. Enable a `Microsoft.Storage.Global` service endpoint on the virtual network and subnet.
130+
1. Enable a `Microsoft.Storage` service endpoint on the virtual network and subnet.
130131

131132
```azurepowershell-interactive
132133
Get-AzVirtualNetwork -ResourceGroupName $resourceGroup -Name $vnetName | Set-AzVirtualNetworkSubnetConfig -Name $subnetName -AddressPrefix $subnetAddressPrefix -ServiceEndpoint "Microsoft.Storage.Global" | Set-AzVirtualNetwork
@@ -189,7 +190,7 @@ To add a new or existing virtual network to your storage account, follow these s
189190
az storage account update --resource-group $resourceGroup --name $storageAccount --default-action Deny
190191
```
191192

192-
1. Enable a `Microsoft.Storage.Global` service endpoint on the virtual network and subnet.
193+
1. Enable a `Microsoft.Storage` service endpoint on the virtual network and subnet.
193194

194195
```azurecli-interactive
195196
az network vnet subnet update --resource-group $resourceGroup --vnet-name $vnetName --name $subnetName --service-endpoints "Microsoft.Storage.Global"

0 commit comments

Comments
 (0)