curl --proxy "" relies on curl receiving an empty argument. The command can behave differently across Windows shells because legacy Windows PowerShell native-command passing does not preserve empty strings the same way as the newer modes introduced in PowerShell 7.3.

If the empty value disappears, the following argument can be consumed as the proxy value. That is a command-line parsing problem before any network decision.

For a direct curl request, a nonempty bypass argument makes the intention easier to pass:

curl.exe --noproxy '*' https://example.com/

Use curl.exe deliberately: Windows PowerShell can resolve curl to an alias for another command. The quoted star is passed as curl's all-hosts bypass value.

For scripts needing more elaborate native arguments, check the PowerShell version and its native argument-passing mode. Copying a cmd example unchanged does not establish that curl received the same argument list.

Erthyglow kevrennek