Windows Azure – Create a Network


In two previous posts i was talking about how to :

Ok, now we have almost everything in order to build our first VM, actually, we can build a VM right now, but! But, if you wanna set up a full environement and have you VMs & services connect each others, you need a network. Indeed, Microsoft provides virtual ip by default for your VM.

Let’s look what we have in Azure module about VNet

Like you see, there is only one New-* cmdlet : New-AzureVNetGateway. Actually, this is not what we are looking for, we’ll come back later to discuss this and configure a VPN to make your Azure VMs accessing in your network. All cmdlets *-AzureVNetConfig interest us,  let’s take a look about them.

 Ok this is not our precious cmdlet, let’s see Get-AzureVNetConfig

OK, so nothing possible only with PowerShell for now, let’s create it manually on web console, and how the .netcfg file looks like !




























Ok, now we have our Template Network configured, let’s have a look about the config file generated 🙂

We got a beautiful XML file 🙂

Let’s see how things gone if i modify 2-3 things and try to import it !

It seems to work 🙂





It seems the Network is created! GOOD!

This is how you create a network with PowerShell, but one thing bothers me: You can’t have two Network it seems 🙁

The following function will help you create a new network from scratch !

How using it ?

FIrst create two collections for subnets and DNS Servers and then use New-AzureVNetwork to create the Network.

With that you should be enable to create a network without any web console 😉






















NB: Keep in mind that this function is very basic and may need some improvements ;). Also, i don’t have VPN here to check Site-To-Site connecitvity