How To Create An Azure VM With Multiple NICs

We will use the following blog post as guidance.

Updating version of Azure PowerShell

Before we begin we will need to make sure that we have the latest version of Azure PowerShell tooling in our environment. Initial instructions on how to install Azure PowerShell from scratch can be found here:

If you have already installed PowerShell before, you will just need to update it. The link below will run the Web Platform Installer and suggest updating to the latest version of Azure PowerShell.


PowerShell trivia

Add-AzureAccount – allows to login to the subscription account.

Get-AzureAccount – list all currently logged in Accounts.

Get-AzureSubscription – will list all Azure Subscriptions for currently logged on account.


Important thing to note that VNet, Cloud Service and storage account must be created in the same region/datacenter.

Virtual Network

VNet will have the following configuration and located in “North Europe” datacenter


Storage Account

Storage account must be created in the “North Europe” datacenter. We will assume that the name is “n3l400sqlcluster”. Text highlighted with bold and red color will be specific to your account and will need to be changed accordingly.

Select Active subscription for the rest of PowerShell commands

To select “active” subscription we will use this command.

Set-AzureSubscription -SubscriptionName “Azure Pass O4S SQLCLUSTER” -CurrentStorageAccountName “n3l400sqlcluster

Cloud Service

For some reason New-AzureVM refuses to create new Cloud Service, so new CloudService must be created in the same region:


Cloud Service Name is: ppMultiNIC

Editing PowerShell to create the image

Fields in bold red will need to be changed to suit your environment.

#Select a VM image from Azure VM image gallery. Note that images change frequently and are available by region. The image specified in the example below may change or might not be in your region, so be sure to specify the image you need.

$adminuser = “adminuser

$adminpwd = “MyPassword_1

$image = (Get-AzureVMImage -Verbose:$false | Where-Object {$_.label -like “Windows Server 2012 R2 Datacenter*”} | Sort-Object –Descending PublishedDate)[0]

#Create a VM configuration.

$vm = New-AzureVMConfig -Name “MultiNicVM” -InstanceSize “ExtraLarge” -Image $image.ImageName –AvailabilitySetName “ppMyAVSet

#Create the default administrator login.

Add-AzureProvisioningConfig –VM $vm -Windows -AdminUserName $adminuser -Password $adminpwd

#Add additional NICs to the VM configuration.

Add-AzureNetworkInterfaceConfig -Name “Ethernet1” -SubnetName “Subnet-1” -StaticVNetIPAddress “” -VM $vm

Add-AzureNetworkInterfaceConfig -Name “Ethernet2” -SubnetName “Subnet-2” -StaticVNetIPAddress “” -VM $vm

#Specify the subnet and IP address for the default NIC.

Set-AzureSubnet -SubnetNames “Frontend” -VM $vm

Set-AzureStaticVNetIP -IPAddress “” -VM $vm

#Create the VM in your virtual network.

New-AzureVM -ServiceName “ppMultiNIC” –VNetName “vn-cluster” –VMs $vm


VM is created


Checking Virtual Networks:





Pinging rest of the infrastructure

Domain Controller in that Lab is


Leave a Reply