Files
management-scripts/Install-Wireguard.ps1
T

15 lines
546 B
PowerShell
Raw Normal View History

2020-11-19 17:50:42 -05:00
## Make sure we have an administrative token
If ( IsAdmin )
{
$URL = "https://download.wireguard.com/windows-client/wireguard-installer.exe"
2020-11-19 17:50:42 -05:00
## Install package
$Installer = Download-File -URL $URL
2020-12-03 17:48:24 -05:00
If ( Test-Path $Installer ) {
2020-12-03 17:50:22 -05:00
End-Process -Name "wireguard" -Match -Force
2020-12-03 17:48:24 -05:00
Install-Program -Path "${Installer}" -Delete
2020-12-03 17:50:22 -05:00
End-Process -Name "wireguard" -Match -Force
2020-12-03 17:48:24 -05:00
}
Else { LogMsg "The Wireguard installer was not downloaded properly" }
2020-11-19 17:50:42 -05:00
}
Else { LogMsg "Must be an administrator to install Wireguard" }