How it works...

In step 1, you define PowerShell variables that hold key Azure object names. In step 2, you log in to Azure and ensure that the resource group and storage account exist (and create them if not). There is no output from either of these steps.

In step 3, you create two new virtual subnets (one for the gateway you use in the Create and use Azure VPN recipe) and the other a cloud based subnet. Then in step 4 you create the virtual network. There is no output from either step 3 or step 4.

In step 5, you create an Azure public IP address which you use later in this recipe. Then you display the IP address details, as shown in the following screenshot:

With step 6, you create an Azure network interface. You configure the NIC to have ...

Get Windows Server 2016 Automation with PowerShell Cookbook - Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.