Write-Host"This usually means antivirus, a firewall, or a web filter intercepted the download and replaced it with a block/warning page instead of letting the real file through."-ForegroundColorYellow
Write-Host"--- What was actually downloaded (first 15 lines, for troubleshooting) ---"-ForegroundColorYellow
$preview|ForEach-Object{Write-Host$_}
Write-Host"--- end ---"-ForegroundColorYellow
Write-Host""
}
Write-Host"Try running setup.bat again. If it keeps happening, ask IT whether winscp.net / sourceforge.net downloads are being blocked, or download WinSCP-6.3.6-Automation.zip manually in a browser and unzip it into:"-ForegroundColorYellow