使用PowerShell从SourceForge下载openBLAS

使用PowerShell从SourceForge下载openBLAS,powershell,sourceforge,openblas,Powershell,Sourceforge,Openblas,我想使用PowerShell从SourceForge下载openBLAS。我的问题是,我读过的PS文档总是引用一个特定的文件名,但是,当我提交该请求时,SF将其重定向到/下载,然后发生了一些事情,但我没有得到我想要的。以下是当前代码: $url = 'https://sourceforge.net/projects/openblas/files/v0.3.6/OpenBLAS-0.3.6-x64.zip' # $url = 'https://sourceforge.net/projects/op

我想使用PowerShell从SourceForge下载openBLAS。我的问题是,我读过的PS文档总是引用一个特定的文件名,但是,当我提交该请求时,SF将其重定向到/下载,然后发生了一些事情,但我没有得到我想要的。以下是当前代码:

$url = 'https://sourceforge.net/projects/openblas/files/v0.3.6/OpenBLAS-0.3.6-x64.zip'
# $url = 'https://sourceforge.net/projects/openblas/files/v0.3.6/OpenBLAS-0.3.6-x64.zip/download'
$output = 'C:\BLAS\OpenBLAS-0.3.6-x64.zip'
Invoke-WebRequest $url -OutFile $output

它在Windows10 PowerShell 5.1中适用于我

Invoke-WebRequest -Uri $url -OutFile $path -UserAgent [Microsoft.PowerShell.Commands.PSUserAgent]::FireFox

我不知道如何关闭请求,但这已经为我工作了一段时间:$uri=''$output='C:\BLAS\v0.3.10.zip'$webclient=New Object System.Net.webclient$webclient.DownloadFile($uri,“$output”)