$ProgressPreference = "SilentlyContinue"
$Link = "https://www.vzvz.nl/media/downloads/zorg-id-desktop-app-windows/download"
$File = "ZORG-ID.zip"
$Path = "C:\Users\Public\Downloads"
if (Test-Path $Path\$File) {
Remove-Item $Path\$File
}
Invoke-WebRequest -Uri $Link -Proxy http://proxy.ezorg.nl:8080 -ProxyUseDefaultCredentials -OutFile $Path\$File -UseBasicParsing
Expand-Archive $Path\$File $Path -Force
$msiFile = Get-ChildItem -Path $Path -Filter "ZORG-ID*.msi" -Recurse | Sort-Object LastWriteTime -Descending | Select-Object -First 1 -ExpandProperty FullName
Start-Process -FilePath "msiexec.exe" -ArgumentList "/i `"$msiFile`" /qn /L*v $Path\zorgidinstall.log" -Wait