$P2SRootCertName2 ="GET-CMD-RootCert.cer" #Setting the Root Certificate name, it can be whatever name you want $RootCertBase64 = ::ToBase64String($cert.RawData) $cert = New-Object 509Certificates.X509Certificate2("C:\GET-CMD_VPN_RootCert.cer") #Getting the public Key from the certificate Select-AzureRmSubscription -SubscriptionId xxxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx #Making sure you are working with the correct Subscription if there are multiple Subscriptions in the account The following script has been released by the Microsoft Team: In my case, I do not have an internal PKI in my lab, so I will use a self-signed certificate. Now, we can create the Virtual Network Gateway:Īt this step, we need to create a Root Certificate and a Client Certificate. This subnet is dedicated to the Virtual Network Gateway Virtual Machines that will be automatically created by Azure. Go to the newly Virtual Network, and create a new Gateway subnet:
In this article, we will focus on how to connect our local network to our Azure Virtual Network. The main difference is that if you log-off or restart the workstation, it loses connection, and you have to reconnect every time.