Files
management-scripts/Install-Wireguard.ps1
T

15 lines
811 B
PowerShell

. 'C:\Users\dyoder\Emberkom\Data\Projects\development\management-scripts\Tools.ps1'
## Make sure we have an administrative token
If ( IsAdmin )
{
If ( Is64bit ) { $URL = 'https://download.wireguard.com/windows-client/wireguard-amd64-latest.msi' }
Else { $URL = 'https://download.wireguard.com/windows-client/wireguard-x86-latest.msi' }
## Install package
Try { Start-Process "msiexec.exe" -ArgumentList "/i ${URL} /qn /norestart DO_NOT_LAUNCH=1" -Wait }
Catch { LogErr $_.Exception.Message }
## Create shortcut on Public desktop
#Create-Shortcut -Path "${Env:Public}\Desktop\WireGuard.LNK" -TargetPath "${Env:ProgramFiles}\WireGuard\wireguard.exe" -Description "WireGuard: Fast, Modern, Secure VPN Tunnel"
}
Else { LogMsg "Must be an administrator to install WireGuard" }