remove con out in Download-File
This commit is contained in:
@@ -190,11 +190,11 @@ Function Download-File {
|
||||
If ( $null -eq $URI ) { Return }
|
||||
If ( [string]::IsNullOrEmpty($File) ) { $File = '{0}{1}' -f (Get-TempPath), (Split-Path $URL -Leaf) }
|
||||
If ( Test-Path $File ) {
|
||||
Write-Output "Deleting existing file: ""${File}"""
|
||||
#Write-Output "Deleting existing file: ""${File}"""
|
||||
Try { Remove-Item $File -Force }
|
||||
Catch { Write-Error $_.Exception.Message ; Return }
|
||||
}
|
||||
Write-Output "Downloading ""${URI}"" to ""${File}"""
|
||||
#Write-Output "Downloading ""${URI}"" to ""${File}"""
|
||||
Try { (New-Object System.Net.WebClient).DownloadFile($URI,$File) }
|
||||
Catch { Write-Error $_.Exception.Message ; Return }
|
||||
If ( Test-Path "${File}" ) { Return "${File}" }
|
||||
|
||||
Reference in New Issue
Block a user