You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/virtual-network/virtual-network-service-endpoint-policies.md
+9-10Lines changed: 9 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -95,7 +95,7 @@ Create a virtual network to contain the resources you create in this tutorial.
95
95
96
96
1. Select **Create**.
97
97
98
-
### [PowerShell](#tab/portal)
98
+
### [PowerShell](#tab/powershell)
99
99
100
100
Before creating a virtual network, you have to create a resource group for the virtual network, and all other resources created in this article. Create a resource group with [New-AzResourceGroup](/powershell/module/az.resources/new-azresourcegroup). The following example creates a resource group named *test-rg*:
101
101
@@ -222,7 +222,7 @@ Create a network security group and rules to restrict network access for the sub
222
222
223
223
1. Select **OK**.
224
224
225
-
### [PowerShell](#tab/portal)
225
+
### [PowerShell](#tab/powershell)
226
226
227
227
Create network security group security rules with [New-AzNetworkSecurityRuleConfig](/powershell/module/az.network/new-aznetworksecurityruleconfig). The following rule allows outbound access to the public IP addresses assigned to the Azure Storage service:
228
228
@@ -330,7 +330,7 @@ The steps necessary to restrict network access to resources created through Azur
330
330
| -------| ------- |
331
331
| Storage account name | Enter **deniedaccount(random-number)**. |
332
332
333
-
### [PowerShell](#tab/portal)
333
+
### [PowerShell](#tab/powershell)
334
334
335
335
Create the allowed Azure storage account with [New-AzStorageAccount](/powershell/module/az.storage/new-azstorageaccount).
1. Repeat the steps above to create a file share in **deniedaccount(random-number)**.
389
388
390
-
### [PowerShell](#tab/portal)
389
+
### [PowerShell](#tab/powershell)
391
390
392
391
### Create allowed storage account
393
392
@@ -473,7 +472,7 @@ By default, storage accounts accept network connections from clients in any netw
473
472
474
473
1. Repeat the steps above to deny network access to **deniedaccount(random-number)**.
475
474
476
-
### [PowerShell](#tab/portal)
475
+
### [PowerShell](#tab/powershell)
477
476
478
477
Use [Update-AzStorageAccountNetworkRuleSet](/powershell/module/az.storage/update-azstorageaccountnetworkruleset) to deny access to the storage accounts except from the virtual network and subnet you created eariler. Once network access is denied, the storage account is not accessible from any network.
479
478
@@ -573,7 +572,7 @@ This section creates the policy definition with the list of allowed resources fo
573
572
574
573
1. Select **Create**.
575
574
576
-
### [PowerShell](#tab/portal)
575
+
### [PowerShell](#tab/powershell)
577
576
578
577
Use [Get-AzStorageAccount](/powershell/module/az.storage/get-azstorageaccount) to retrieve the resource ID for the first (allowed) storage account.
579
578
@@ -631,7 +630,7 @@ After creating the service endpoint policy, you'll associate it with the target
631
630
632
631
1. Select **Apply**.
633
632
634
-
### [PowerShell](#tab/portal)
633
+
### [PowerShell](#tab/powershell)
635
634
636
635
Use [Set-AzVirtualNetworkSubnetConfig](/powershell/module/az.network/set-azvirtualnetworksubnetconfig) to associate the service endpoint policy to the subnet.
637
636
@@ -706,7 +705,7 @@ To test network access to a storage account, deploy a VM in the subnet.
706
705
707
706
1. Select **Create**.
708
707
709
-
### [PowerShell](#tab/portal)
708
+
### [PowerShell](#tab/powershell)
710
709
711
710
Create a virtual machine in the *subnet-1* subnet with [New-AzVM](/powershell/module/az.compute/new-azvm). When running the command that follows, you are prompted for credentials. The values that you enter are configured as the user name and password for the VM. The `-AsJob` option creates the VM in the background, so that you can continue to the next step.
712
711
@@ -817,7 +816,7 @@ Wait for the virtual machine to finish deploying before continuing on to the nex
When no longer needed, you can use [Remove-AzResourceGroup](/powershell/module/az.resources/remove-azresourcegroup) to remove the resource group and all of the resources it contains:
0 commit comments