In this demonstration, we are going to create and configure a virtual network and a subnet from the Azure portal. We already created both of these in earlier demonstrations, for instance, when we created VMs. We are now going to cover this topic in more detail.
In the next demonstration, we are going to configure a virtual network and a subnet using PowerShell. Therefore, we have to take the following steps:
- First, we need to log in to the Azure account as follows:
Connect-AzAccount
- If necessary, select the right subscription as follows:
Select-AzSubscription -SubscriptionId "********-****-****-****-***********"
- Create a resource group for the VNet as follows:
New-AzResourceGroup -Name PacktVNetResourceGroup -Location EastUS
- Next, we can create the VNet as follows:
$virtualNetwork = New-AzVirtualNetwork `
-ResourceGroupName...