Fixing Azure S2S VPN Status Failed


Azure S2S

Here is a quick guide on how to fix Azure S2S (Site-2-Site) VPNs that are showing as ‘Failed’ when in actual fact they are operational.Azure S2S

The S2S VPN is usually marked failed when its provisioning state is unknown or failed. A change to the VPN was made that didn’t go through completely is the usual cause.

The Fix is easy:

  1. Log into Azure using Powershell and connect the AzAccounts module
    Set-ExecutionPolicy Unrestricted
    Import-Module Az.Accounts
    s2s vpn
  2. Get the current status of the S2S VPN
    s2s vpn
  3. Re-Set (not reset) the Gateway
    $Gateway – Get-AzVirtualNetworkGatewayConnection -Name xxxS2sVPNxxx -ResourceGroupName xxxResourceGroupxxx
    Set-AzVirtualNetworkGatewayConnection -VirtualNetworkGatewayConnection $Gateway
    s2s vpn
  4. Check the status of the S2S VPN again
    s2s vpn
  5. Happy days

For more information check out: 



Want to stay up to date with useful tech-tips?  

Follow us on LinkedIn, Facebook or Twitter to be notified when we post new content. Or, even better, scroll down to the very bottom of this page to sign up for our Newsletter. We only send them once a month and you can always unsubscribe.