AI Review Ready
Home / Claude Code / 'irm' is not recognized
Fix · Claude Code · Windows

'irm' is not recognized when installing Claude Code

These errors all mean one thing: the install command was written for a different shell. Windows has two (PowerShell and CMD), and macOS/Linux use a third command. Match the command to the window you are in.

Which error, which fix

ErrorYou are inRun instead
'irm' is not recognized as an internal or external commandCMDThe CMD command below, or open PowerShell
The token '&&' is not a valid statement separator in this versionPowerShellThe 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 cmdletWindows (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

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.