curl vs curl.exe in PowerShell: The Alias Trap

In Windows PowerShell, curl and wget are aliases for Invoke-WebRequest — call curl.exe explicitly to run the real curl.

WindowscurlaliasdeveloperpowershellLow risk
Use curl.exe (with the .exe suffix) to run the genuine curl binary; plain curl in PowerShell 5.1 runs Invoke-WebRequest instead.

01Command

Command
$ curl.exe -I https://example.com
Get-Alias curl
Get-Command curl.exe | Select-Object Source

02What it does

Windows PowerShell 5.1 defines curl and wget as aliases for Invoke-WebRequest, so copying curl commands from the internet fails with 'a parameter cannot be found' or a hung interactive prompt. The real curl.exe (a genuine libcurl build) ships with Windows 10 1803+ in System32, and typing the .exe suffix bypasses the alias. PowerShell 7 removed these aliases, which is why the same command may work there — and scripts should always use the .exe form for safety.

03Risk

RiskLow risk
RequirementsWindows 10 1803+ ships curl.exe in System32; on older builds install it separately.
!Warning: Don't 'fix' this by removing the built-in alias in profiles other tools rely on; prefer the explicit curl.exe form.

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

  • Invoke-WebRequest - SS64
    SS64 · technical · 2026-09-17
    Evidence: Notes that curl is an alias for Invoke-WebRequest in Windows PowerShell and that curl.exe is the separate native binary.
  • Invoke-WebRequest
    Microsoft Learn · vendor-doc · 2026-09-17
    Evidence: Invoke-WebRequest is the cmdlet behind PowerShell's curl alias; it uses different syntax than curl.exe.

Last verified: 2026-09-18 · Category: Developer

06Related solutions