File - Powershell 2.0 Download
catch Write-Error "[FAILED] Download error: $($ .Exception.Message)" if ($ .Exception.InnerException) Write-Error "Inner Exception: $($_.Exception.InnerException.Message)"
# The actual download $webClient.DownloadFile($Url, $OutputPath) powershell 2.0 download file
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12 Note: If Tls12 enum doesn't exist (rare in PS2.0), use the integer value: catch Write-Error "[FAILED] Download error: $($
function Download-FileWithProgress param($url, $outputPath) $client = New-Object System.Net.WebClient $stream = $null $fileStream = $null powershell 2.0 download file