# This script prompts the user for a domain\username to add to the # network configuration operators group, and adds the registry key for # limited user interface in order for non-admin user to control wireguard. $user = Read-Host -Prompt 'Input your username, in the format domain\username' New-Item "hklm:\software\wireguard" New-ItemProperty "hklm:\software\wireguard" -Name "LimitedOperatorUI" -Value 1 -PropertyType "DWord" -Force Add-LocalGroupMember -Group "Network Configuration Operators" -Member "$user"