Skip to content

Instantly share code, notes, and snippets.

@eye-scuzzy
Created January 12, 2020 14:19
Show Gist options
  • Save eye-scuzzy/25c8d67697cea1f6170f08310d2456c7 to your computer and use it in GitHub Desktop.
Save eye-scuzzy/25c8d67697cea1f6170f08310d2456c7 to your computer and use it in GitHub Desktop.
OpenVPN 2.4 netsh command failed ipv6 leaseweb
# First thing you need to do after OpenVPN installation is add current user to the ovpn_admin_group
# https://community.openvpn.net/openvpn/wiki/OpenVPNInteractiveService
# then "Import profile" from OpenVPN GUI and press "Connect" from context menu
# XXX this script doesn't work for "Start OpenVPN on this config file" from context menu on .opvn file
# for this way you need to add administrators privileges for both openvpn.exe and openvpn-gui.exe
$user = [System.Security.Principal.WindowsIdentity]::GetCurrent().Name
$key = "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\OpenVPN"
$value = "ovpn_admin_group"
$group = (Get-ItemProperty $key -Name $value).$value
New-LocalGroup -Name $group -Description "Users are authorized to use OpenVPN"
Add-LocalGroupMember -Group $group -Member $user
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment