powershell命令行参数都是大写执行的?

powershell command line parameter are executed in uppercase?

我想在 powershell 脚本中使用 Windows 下的 WGET 命令行程序。

示例: wget https://domain-name/file_01.pdf -o wgetlog.txt

第 1 步 - 使用 cmd.exe 执行,此命令工作正常:

第 2 步 - 在 powershell 脚本中执行,此命令未按预期运行:

WGET 是一个区分大小写参数的程序:

因此,我怀疑使用 powershell 执行的脚本不负责 "case sensitive" 功能并执行命令行 "after an upper case conversion".

有没有办法应用区分大小写的命令或解决此问题的解决方法?

出于某些无法解释的原因,Windows PowerShell 团队决定 wget alias name of the Invoke-WebRequest cmdlet

Invoke-WebRequest 甚至不尝试与 wget 兼容。

为确保 PowerShell 使用 actual wget 程序,请使用其全名 wget.exe

wget.exe https://domain-name/file_01.pdf -o wgetlog.txt