This article covers the solution to the VPN settings problem where you get the following error message when you try to change the default gateway of your VPN connection.
Unable to allow the editing of network components at this time because they are currently being modified elsewhere.
Let’s first discuss why do we need to change the default gateway of our VPN connection. By default, when we configure a VPN in Windows, Windows uses the gateway of the remote computer to route all the network traffic. This includes local as well as Internet traffic. This is very inefficient particularly when you are using a lot of local area network bandwidth making the local network flow very slow. This can also cause problems like the DNS not recognizing the local network resources etc.
Since the VPN is usually used to access the resources of the remote computer, it is not necessary to route all the traffic through the VPN. Windows gives you a setting in which you can change the default gateway of the VPN connection from the remote computer to the local gateway. This concept is called Split Tunneling.
So now we understand that we can use split tunneling to access the resources of the remote connected computer (VPN) as well use our local resources as we were previously using without establishing the VPN connection.
Windows 10 comes with this bug where you get the error message listed above and will not let you configure the default gateway to your liking. Fortunately, you can use PowerShell to change the VPN settings instantly.
To enable/disable split tunneling through PowerShell, follow the instructions below:
1- Open PowerShell with administrative privileges
2a- To enable split tunneling, run the following commands: Get-VpnConnection Set-VpnConnection -Name “VPNconnection” -SplitTunneling $True Where “VPNconnection” is the name of the VPN connection you want to refer to.
2b- To disable split tunneling, run the following commands: Get-VpnConnection Set-VpnConnection -Name “VPNconnection” -SplitTunneling $False Where “VPNconnection” is the name of the VPN connection you want to refer to.
I hope this will solve your problem. Now it’s your turn to share your experience with us in the comments below.