Allow windows users install VPN for all users in the system (#1310)

This commit is contained in:
Jack Ivanov 2019-01-28 23:50:58 +01:00 committed by Dan Guido
parent f1cb183ecf
commit a266b4d633
2 changed files with 14 additions and 0 deletions

View file

@ -10,6 +10,13 @@ To install automatically, use the generated user Powershell script.
```powershell
powershell -ExecutionPolicy ByPass -File C:\path\to\windows_USER.ps1 -Add
```
If you have more than one account on your Windows 10 machine (e.g. one with administrator privileges and one without) and would like to have the VPN connection available to all users, pass the parameter `-AllUsers`
```powershell
powershell -ExecutionPolicy ByPass -File C:\path\to\windows_USER.ps1 -Add -AllUsers
```
4. The command has help information available. To view its full help, run this from Powershell:
```powershell
Get-Help -Name .\windows_USER.ps1 -Full | more

View file

@ -29,6 +29,9 @@ Note that this must be passed in as a SecureString, not a regular string.
You can create a secure string with the `Read-Host -AsSecureString` cmdlet.
See the examples for more information.
.PARAMETER AllUsers
Allow all users to use the VPN
.EXAMPLE
client_USER.ps1 -Add
@ -63,6 +66,9 @@ Save the embedded CA cert and encrypted user PKCS12 file.
[Parameter(ParameterSetName="Add")]
[SecureString] $Pkcs12DecryptionPassword,
[Parameter(ParameterSetName="Add")]
[Switch] $AllUsers = $false,
[Parameter(Mandatory, ParameterSetName="Remove")]
[Switch] $Remove,
@ -164,6 +170,7 @@ function Add-AlgoVPN {
TunnelType = "IKEv2"
AuthenticationMethod = "MachineCertificate"
EncryptionLevel = "Required"
AllUserConnection = $AllUsers
}
Add-VpnConnection @addVpnParams