Wireguard Windows Setup

Modern state-of-the-art VPN designed to be simplier and faster that IPsec and openVPN.

Download latest Windows Installer.

Slient Install

Wireguard may be installed silently via msiexec.

Install wireguard and remove default auto-start GUI (powershell as admin).
Start-Process msiexec.exe -ArgumentList '/q', '/I', 'wireguard-amd64-0.1.0.msi' -Wait -NoNewWindow -PassThru | Out-Null
Start-Process 'C:\Program Files\WireGuard\wireguard.exe' -ArgumentList '/uninstallmanagerservice' -Wait -NoNewWindow -PassThru | Out-Null

Add Pre-configured Tunnel

Pre-configured tunnels may be added as a separate service.

Install my-tunnel.conf as a startup tunnel (powershell as admin).
Start-Process 'C:\Program Files\WireGuard\wireguard.exe' -ArgumentList '/installtunnelservice', 'my-tunnel.conf' -Wait -NoNewWindow -PassThru | Out-Null
Start-Process sc.exe -ArgumentList 'config', 'WireGuardTunnel$my-tunnel', 'start= delayed-auto' -Wait -NoNewWindow -PassThru | Out-Null
Start-Service -Name WireGuardTunnel$my-tunnel -ErrorAction SilentlyContinue

Note

The service is set to automatic (delayed) as this will guarantee the service starting if the network is not available when the service first starts. This mainly happens due to a very large hosts file or network being unavailable at boot.