blob: a2baefa547215d82e1be6b8aa52b60e9ce7bd0ea (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
try {
$url = "https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/latest-virtio/virtio-win-guest-tools.exe"
(New-Object System.Net.WebClient).DownloadFile($url, "C:\virtio-win-guest-tools.exe")
Write-Output "[INFO] Downloaded $url"
Start-Process -FilePath "C:\virtio-win-guest-tools.exe" -ArgumentList "/install /passive /norestart" -Wait -Verbose
Write-Output "[INFO] Successfully installed VirtIO Guest Tools"
Remove-Item "C:\virtio-win-guest-tools.exe" -Force
} catch {
Write-Host "[ERR] Error occured while installing VirtIO Guest Tools"
Write-Host "$($_.Exception.Message)"
}
|