diff --git a/src/Public/Get-RemoteChecksum.ps1 b/src/Public/Get-RemoteChecksum.ps1 index 0b735ab..bebd0fe 100644 --- a/src/Public/Get-RemoteChecksum.ps1 +++ b/src/Public/Get-RemoteChecksum.ps1 @@ -8,7 +8,8 @@ #> function Get-RemoteChecksum( [string] $Url, $Algorithm='sha256', $Headers ) { $fn = [System.IO.Path]::GetTempFileName() - Invoke-WebRequest $Url -OutFile $fn -UseBasicParsing -Headers $Headers + $wc = New-Object net.webclient + $wc.DownloadFile($Url, $fn) $res = Get-FileHash $fn -Algorithm $Algorithm | ForEach-Object Hash Remove-Item $fn -ea ignore return $res.ToLower()