Configuring virtual networks for an Azure storage account using PowerShell
In this recipe, we'll learn to limit access of an Azure storage account to a particular virtual network using PowerShell.
Getting ready
Before you start, perform the following steps:
- Make sure you have an existing Azure storage account. If not, create one by following the Provisioning an Azure storage account using PowerShell recipe.
- Log in to your Azure subscription in PowerShell. To log in, run the
Connect-AzAccount
command in a new PowerShell window and follow the instructions.
How to do it…
The steps for this recipe are as follows:
- Execute the following command to disable all networks for an Azure storage account:
$resourcegroup = "packtADE" $location="eastus" Update-AzStorageAccountNetworkRuleSet -ResourceGroupName $resourcegroup -Name packtadestorage -DefaultAction Deny
- Execute the following command to create a new virtual network ...