Creating Site to Site VPN in Azure Resource Manager

This will be a short post, just wanted to have all Powershell code needed to create a connection between a network outside Azure and your ARM resources in one place.

I tried to set this up with my local TMG server, though this did not work as it did with ASM. Check this page for supported configurations.

Even if it does not work for my setup, the code is nice to have in one place.

To create the bits needed:

To test the connection(more):

To remove what was created ( remember to remove all resources in the ARM network beforehand):

Note: With all the changes in resent Azure Powershell modules, there can be some inconsistencies. This was done on 1.0.1. read more