Auto Disconnect P2S VPN Connections

Trent Becker 71 Reputation points
2024-08-29T14:42:49.0533333+00:00

Hello,

I am trying to setup the ability to disconnect users on an Azure VWan, Hub, P2S session. This can be manually done by going to the Point to Site Sessions page and manually disconnecting it. However, this is not ideal for trying to disconnect users after 24 hours. I wanted to automate this using the Disconnect-AzVirtualNetworkGatewayVpnConnection powershell command. However, that only works on Network Gateways and does not appear to support P2S gateways inside of an Azure Virtual Hub. Is there a way to disconnect users after 24 hours of being connected to a session whether it be through powershell or some configuration settings?

Azure Virtual WAN
Azure Virtual WAN
An Azure virtual networking service that provides optimized and automated branch-to-branch connectivity.
215 questions
Azure VPN Gateway
Azure VPN Gateway
An Azure service that enables the connection of on-premises networks to Azure through site-to-site virtual private networks.
1,514 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,458 questions
{count} votes

Accepted answer
  1. KapilAnanth-MSFT 44,311 Reputation points Microsoft Employee
    2024-08-30T12:07:05.33+00:00

    @Trent Becker ,

    Welcome to the Microsoft Q&A Platform. Thank you for reaching out & I hope you are doing well.

    I understand that you would like to know the equivalent of Disconnect-AzVirtualNetworkGatewayVpnConnection for Azure vWAN P2S Gateway.

    You can use this : Disconnect-AzP2SVpnGatewayVpnConnection

    • The syntax is similar to regular VPN Gateway's P2S.

    Kindly let us know if this helps or you need further assistance on this issue.

    Thanks,

    Kapil


    Please don’t forget to close the thread by clicking "Accept the answer" wherever the information provided helps you, as this can be beneficial to other community members.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.