This quick blog post, shows, how to use Azure PowerShell to deploy a site-to-site VPN Gateway between Azure and On-Premise.

Requirements: This tutorial assumes that you already have a Microsoft Azure account set up and you have the PowerShell Azure module on your machine installed. If you want to know how to install the PowerShell Azure module on your machine, check out this link.

The simplest way to get started is to sign in interactively at the command line.

This cmdlet will bring up a dialog box prompting you for your email address and password associated with your Azure account.

If you have more than one subscription associated with your mail account, you can choose the default subscription. To perform this task, we will use the following commands:

Once you set your default subscription, you’re ready to start.

Set the variables

Here, we define the characteristics of our environment and connection properties.

Resource Deployment

In this section, we deploy Azure resources. Once we know the public IP assigned to Azure Gateway, we can finish the configuration of our VPN device.

Verify the VPN connection

We can check the status of our connection using the following command.

VPN S2S in Microsoft Azure

If you want to know more about Azure VPN Gateway, check out this link: