Chapter 6. Virtual Networks

Microsoft Azure Virtual Networks are a critical feature for many scenarios. Deploying a virtual machine into a virtual network allows several key features that may be required with more-advanced virtual machine workloads. The ability to specify static IP addresses, Domain Name System (DNS) servers, and internal load balancing; and to enable hybrid connectivity to an on-premises data center, or even secure access from an individual client machine, are all possible with virtual networks.

Virtual networks also provide the ability to connect virtual machines in other cloud services and even other virtual networks to create a larger isolated network. This private network can potentially span multiple Microsoft Azure regions globally and even multiple on-premises sites.

Virtual networks allow you to control name resolution as well. You can define one or more DNS servers to assign to the virtual machines that are deployed into the virtual network. This allows workloads such as Active Directory or any other scenario where you need automatic DNS server assignment.

Now that you know a little about why virtual networks are so useful and powerful, let’s dive in and see how we can use PowerShell to manage them.

Understanding Virtual Network Configuration

The support for creating and updating virtual networks directly from PowerShell is relatively primitive. There are two key cmdlets that can assist: Get-AzureVNetConfig and Set-AzureVNetConfig. Each cmdlet works by either ...

Get Automating Microsoft Azure Infrastructure Services now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.