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

Occasional Contributor

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.

5 Replies

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.

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"
best response confirmed by CraigWK (Occasional 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..
Amazing, yeah that worked - Now I can at least try troubleshooting the other issue!

@CraigWK Happy to hear! I'll try to setup a test scenario and see if I can replicate this behavior but that will have to wait until I'm back from my holiday break :lol: