This article explains how to activate and deactivate a WireGuard tunnel on Windows via the command line.

To use WireGuard on Windows systems by users who are not a member of the Administrators group, you can refer to article WireGuard on Windows for Non-Admin Users.

If you just would like to activate / deactivate tunnels via the command line, this is also an option. The advantage is that you do not need to make changes to the registry.

Activate WireGuard Tunnel

To activate the WireGuard tunnel defined in the configuration file c:\wgvpn\vpnhome.conf, search for the command prompt (enter cmd into the search field of Windows) and select "Run as administrator" and paste the following command into the command prompt window and press enter:

wireguard /installtunnelservice C:\wgvpn\vpnhome.conf

Deactivate WireGuard Tunnel

To deactivate the WireGuard tunnel vpnhome.conf from the command line, use the following command (again, needs "Run as administrator"):

wireguard /uninstalltunnelservice vpnhome

Related Articles

WireGuard on Windows for Non-Admin Users