Forum Discussion

CraigWK's avatar
CraigWK
Copper Contributor
May 05, 2022

Azure VPN Client VPN from OMA-URI in MEM(Intune) Device config not removing itself

Hello!
I set up a VPN connection by following this guide Create an Intune profile for Azure VPN clients - Azure VPN Gateway | Microsoft Docs and it worked, it appeared in the Azure VPN Client app and connected. Now an edit was made to the VPN so I edited the XML and re-uploaded it, but there has been no change, so I decided to delete the connection and let it push out again, but I cannot remove it! 

I've tried clicking remove, but I get a warning the connection cannot be connected, so I disconnect, but it immediately reconnects before I can even click remove. 
I've tried scoping it away from me, and even scoping it somewhere else and explicitly excluding me from it, and while the per device setting on MEM has updated to no longer include my PC, the connection is still there and still auto-reconnects.

  • did get-vpnconnection give you a profilename? if so, could you try rasdial VPNProfileName /DISCONNECT

    Perhaps I'm way off with this, but it helped me a while back when I had a similar issue with a profile that did not want to disconnect..
  • Oktay Sari's avatar
    Oktay Sari
    Iron Contributor

    is this an always-on VPN? Could you try powershell?

    get-vpnconnection to see what vpn profiles have been installed and remove-vpnconnection to remove the profile, if that is what you want. 

     

    PS. I know it doesn't answer the question, but perhaps could help you get rid of the VPN profile so you can troubleshoot without reconnecting automatically.

    • CraigWK's avatar
      CraigWK
      Copper Contributor
      Hi - No, also via PS I get "The VPN connection cannot be removed from the local user connections: Cannot delete a connection while it is connected"
      • Oktay Sari's avatar
        Oktay Sari
        Iron Contributor
        did get-vpnconnection give you a profilename? if so, could you try rasdial VPNProfileName /DISCONNECT

        Perhaps I'm way off with this, but it helped me a while back when I had a similar issue with a profile that did not want to disconnect..

Resources