Which error, which fix
| Error | You are in | Run instead |
|---|---|---|
'irm' is not recognized as an internal or external command | CMD | The CMD command below, or open PowerShell |
The token '&&' is not a valid statement separator in this version | PowerShell | The PowerShell command |
A parameter cannot be found that matches parameter name 'fsSL' | PowerShell (ran the macOS/Linux curl command) | The PowerShell command |
'bash' is not recognized as the name of a cmdlet | Windows (ran the macOS/Linux command) | The PowerShell command |
PowerShell command
irm https://claude.ai/install.ps1 | iex
CMD command
curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd
Tell them apart by the prompt: PowerShell starts with PS C:\, CMD with just C:\.
Why 'fsSL' fails in PowerShell
In Windows PowerShell, curl is an alias for Invoke-WebRequest, which does not accept curl's -fsSL flags. The Linux command curl -fsSL https://claude.ai/install.sh | bash is only for macOS, Linux and WSL.
The command printed script text and installed nothing
Only half the command ran. irm https://claude.ai/install.ps1 on its own just prints the script; the | iex part runs it. In CMD, curl -fsSL https://claude.ai/install.cmd without -o install.cmd prints the batch file instead of saving it. Paste the whole line.
Confirm it worked
Open a new terminal and run claude --version. It should print a version number. If it says 'claude' is not recognized, see the PATH fix.
Other Claude Code install errors on Windows
- Full guide: install Claude Code on Windows
- 'claude' is not recognized after install or after an update
- running scripts is disabled on this system (npm install)
- requires either Git for Windows (for bash) or PowerShell
- < was unexpected at this time, System.Xml.XmlDocument, or 403 during install
Source: Anthropic's Claude Code docs, Advanced setup and Troubleshoot installation and login, read 28 Nov 2026. Claude Code updates often: if a step here no longer matches, the official docs win.