## Make sure we have an administrative token If ( IsAdmin ) { $URL = "https://download.wireguard.com/windows-client/wireguard-installer.exe" ## Install package $Installer = Download-File -URL $URL If ( Test-Path $Installer ) { Install-Program -Path "${Installer}" -Delete } Else { LogMsg "The Wireguard installer was not downloaded properly" } } Else { LogMsg "Must be an administrator to install Wireguard" }