AI Review Ready
Home / Claude Code / Install on Windows
Guide · Claude Code · Windows

Install Claude Code on Windows: commands and error fixes

One command installs Claude Code on Windows, but it is a different command in PowerShell and in CMD, and running the wrong one is the most common reason the install fails. Here is which to use, how to confirm it worked, and what each error means.

The short answer

Open PowerShell (search "PowerShell" in the Start menu) and run:

irm https://claude.ai/install.ps1 | iex

Or, in Command Prompt (CMD):

curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd

You do not need to run as Administrator. The command shows no progress while it downloads. When it finishes, open a new terminal window and run:

claude --version

A working install prints a version number, such as 2.1.211 (Claude Code). Then run claude inside your project folder and log in through the browser prompt.

Am I in PowerShell or CMD?

Look at the prompt. PowerShell shows PS C:\Users\YourName>; CMD shows C:\Users\YourName> without the PS. Using the other shell's command gives an error straight away:

  • 'irm' is not recognized: you are in CMD. Use the CMD command, or open PowerShell. More
  • The token '&&' is not a valid statement separator: you are in PowerShell. Use the PowerShell command.

Other ways to install

  • WinGet: winget install Anthropic.ClaudeCode. A WinGet install does not update itself; run winget upgrade Anthropic.ClaudeCode from time to time. The PowerShell and CMD installers update automatically in the background.
  • Desktop app: if you would rather not use a terminal at all, the Claude desktop app for Windows runs Claude Code without one.
  • npm still works (npm install -g @anthropic-ai/claude-code), but the docs list the native installer as recommended, and npm on Windows brings its own errors, such as running scripts is disabled.

What you need first

  • Windows 10 version 1809 or later, or Windows Server 2019 or later, on a 64-bit (x64 or ARM64) machine, with 4 GB+ RAM.
  • An internet connection, and a country where Claude Code is available.
  • A paid account: Pro, Max, Ultra, Team, Enterprise or Console. The free claude.ai plan does not include Claude Code.

Native Windows or WSL?

OptionNeedsSandboxingUse when
Native WindowsNothing; Git for Windows optionalNot supportedYour projects and tools are Windows-native
WSL 2WSL 2 enabledSupportedLinux toolchains, or you want sandboxed commands
WSL 1WSL 1 enabledNot supportedWSL 2 is not available

In WSL, open your Linux distribution and run the Linux installer there (curl -fsSL https://claude.ai/install.sh | bash). You install and start claude inside the WSL terminal, not from PowerShell or CMD.

Do I need Git for Windows?

No, it is optional. Without it, Claude Code runs commands through PowerShell. With it, Claude Code can also use Git Bash. If Git is installed but not found, set its bash.exe path in settings.json:

{
  "env": {
    "CLAUDE_CODE_GIT_BASH_PATH": "C:\\Program Files\\Git\\bin\\bash.exe"
  }
}

Details: requires either Git for Windows or PowerShell.

Check the install

claude --version
claude doctor

claude doctor prints read-only diagnostics (install health, settings errors, warnings with suggested fixes) without starting a session.

Errors, and what each one means

You seeCauseFix
'irm' is not recognizedPowerShell command run in CMDUse the CMD command or open PowerShell
The token '&&' is not a valid statement separatorCMD command run in PowerShellUse the PowerShell command
A parameter cannot be found that matches parameter name 'fsSL' or 'bash' is not recognizedThe macOS/Linux command run on WindowsUse the Windows command
'claude' is not recognizedInstall folder not on PATH, or the terminal was opened before the installAdd it to PATH
running scripts is disabled on this systemPowerShell execution policy blocks npm's .ps1 launchersThree fixes
< was unexpected at this time, System.Xml.XmlDocument, or a 403The download returned a web page or an error instead of the scriptRegion, network or retry
The process cannot access the file ... being used by another processAn earlier install attempt or antivirus scan holds the downloadSee below
Claude Code does not support 32-bit WindowsYou opened "Windows PowerShell (x86)"See below
claude opens Claude DesktopAn older Claude Desktop registered Claude.exe first on PATHUpdate Claude Desktop

"The process cannot access the file" during install

Close other PowerShell windows running the installer, wait for antivirus scans to finish, then clear the downloads folder and run the installer again:

Remove-Item -Recurse -Force "$env:USERPROFILE\.claude\downloads"
irm https://claude.ai/install.ps1 | iex

"Claude Code does not support 32-bit Windows"

The Start menu has both Windows PowerShell and Windows PowerShell (x86); the x86 one is a 32-bit process and triggers this even on 64-bit Windows. Check in the same window:

[Environment]::Is64BitOperatingSystem

True: close it, open Windows PowerShell (no x86) and install again. False: your Windows is 32-bit, and Claude Code needs a 64-bit system.

"API Error: 403 Request not allowed" after login

  • Pro, Max or Ultra: check your subscription is active at claude.ai/settings.
  • Console users: your account needs the "Claude Code" or "Developer" role (an admin sets it on the Console Members page).
  • Behind a corporate proxy: the proxy can block API requests; set up the proxy as in the network configuration docs.

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.