richardhicks / aovpn

PowerShell scripts and sample ProfileXML files for configuring Windows 10 Always On VPN
MIT License
160 stars 84 forks source link

Remove-AoVPNConnection.ps1 unable to delete device tunnel #20

Closed Daky60 closed 2 days ago

Daky60 commented 1 year ago

When I attempt deleting a device tunnel with the Remove-Aovpnconnection script, it doesn't work. I get below error: .\Remove-AovpnConnection.ps1 -AllUserConnection -ProfileName "Device-Tunnel" WARNING: Exception calling "DeleteInstance" with "3" argument(s): "The requested item could not be found." WARNING: Unable to remove VPN profile "Device-Tunnel".

It works fine deleting a user tunnel

Daky60 commented 1 year ago

Apparently this was due to trafficfilter tag

richardhicks commented 1 year ago

Interesting. Was the TrafficFilter tag configured incorrectly? Or does it fail if there's a correctly configured TrafficFilter enabled?

Daky60 commented 1 year ago

As far as I can tell, it's configured correctly, no typos etc.. Haven't really looked into it very much but it's an issue we need to solve as rasdial.exe isn't very reliable :/ is it possible to exclude the trafficfilter from an active connection? I don't really understand why trafficfilters would cause an issue though. Are you able to replicate?

richardhicks commented 1 year ago

I will do some testing with a device tunnel configured with traffic filters and see if I can reproduce. I'm going on annual leave soon, though. It may be a while before I can get to this. Stay tuned. :)

richardhicks commented 2 days ago

Unable to reproduce. Will reopen if I encounter the issue again.