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.
01Command
$ curl.exe -I https://example.com
Get-Alias curl
Get-Command curl.exe | Select-Object Source02What 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
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- Invoke-WebRequest - SS64Evidence: Notes that curl is an alias for Invoke-WebRequest in Windows PowerShell and that curl.exe is the separate native binary.
- Invoke-WebRequestEvidence: 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
Use Windows Package Manager to install, search, and upgrade thousands of applications from the community repository in one command.
Understand PowerShell's execution policy scopes and set the one that lets you run your own local scripts without gutting the security model.
Search inside text files and logs with regex, returning file, line number and match.