How to install Claude Code on Windows. PowerShell and CMD need different commands
How to install Claude Code on Windows from PowerShell, CMD or WinGet, when you need Git for Windows, when WSL is the better choice, and how to fix the usual errors.
Part of the guideClaude Code, the complete guide. From installation to your own skills and plugins
In this article
In short
On Windows, Claude Code installs with one command in PowerShell and a different one in CMD, and most errors come from mixing up the two windows. We also cover WinGet, what Git for Windows does, choosing between Windows and WSL, PATH problems and uninstalling.
Someone copies the install command from the Mac instructions, pastes it into PowerShell and gets an error about a parameter called fsSL. Someone else pastes the PowerShell command into the plain Command Prompt and reads that irm is not recognized. Installing Claude Code on Windows is easy as long as you know which window you are in. Everything below was checked against the Anthropic documentation as of 10 November 2026.
What the tool itself does is covered in What is Claude Code. The rest of the series lives in the Claude Code guide.
Requirements and choosing between Windows and WSL
Claude Code runs on Windows 10 version 1809 or later and on Windows Server 2019 or later. The system must be 64-bit, and the machine needs at least 4 GB of RAM and an internet connection. You do not need administrator rights. To log in you need a Pro, Max, Ultra, Team or Enterprise plan or a Claude Console account, since the free claude.ai plan does not include Claude Code.
First decide where it should run.
| Option | What you need | Sandboxing | When to choose it |
|---|---|---|---|
| Native Windows | Nothing, Git for Windows is optional | No | Windows projects and tools |
| WSL 2 | WSL 2 enabled | Yes | Linux toolchains, isolated commands |
| WSL 1 | WSL 1 enabled | No | When WSL 2 is not available |
Sandboxing isolates the commands Claude runs. On native Windows commands run without it. If you want that layer of protection, choose WSL 2. In WSL you install the Linux version and start it from the WSL terminal, not from PowerShell.
Install from PowerShell or from CMD
Your prompt tells you where you are. In PowerShell the line starts with PS C:\, in CMD with just C:\. In PowerShell paste this.
irm https://claude.ai/install.ps1 | iexIn CMD use this one.
curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmdThere is also a third route, the WinGet package manager, with winget install Anthropic.ClaudeCode. A WinGet install does not update itself, so run winget upgrade Anthropic.ClaudeCode every so often.
The installer shows no progress bar. The program ends up at %USERPROFILE%\.local\bin\claude.exe. When it finishes, open a new window and run claude --version, then claude doctor, which checks the install and your settings without starting a session.
Git for Windows, Git Bash and PowerShell
Git for Windows is not required, but Anthropic recommends it. It gives you Git Bash, which Claude Code uses to run shell commands. Without it, Claude Code runs commands through PowerShell. When you install Git, tick the option that adds it to PATH and restart your terminal.
If Git lives somewhere unusual and Claude Code cannot find it, point to bash.exe in your settings file at %USERPROFILE%\.claude\settings.json. where.exe git shows where Git is installed.
{
"env": {
"CLAUDE_CODE_GIT_BASH_PATH": "C:\\Program Files\\Git\\bin\\bash.exe"
}
}The file must be named bash.exe or sh.exe. The git-bash.exe launcher will not do, and Claude Code ignores it. If the path is right and nothing changes, the documentation points to endpoint security such as AppLocker blocking claude.exe and bash.exe. Ask your IT team for an exception.
Common installation errors on Windows
Most messages have one specific cause.
| Message | What happened |
|---|---|
'irm' is not recognized | You are in CMD with the PowerShell command |
The token '&&' is not a valid statement separator | You are in PowerShell with the CMD command |
A parameter cannot be found that matches parameter name 'fsSL' | You pasted the Mac and Linux command |
'claude' is not recognized | The install folder is not on PATH |
Claude Code does not support 32-bit Windows | You opened the x86 PowerShell |
running scripts is disabled on this system | PowerShell policy blocks scripts after an npm install |
The process cannot access the file | An earlier install or antivirus holds the file |
When claude is not recognized, first check that the program is on disk. In PowerShell, Test-Path "$env:USERPROFILE\.local\bin\claude.exe" tells you. If it prints True, add %USERPROFILE%\.local\bin to your user PATH in the system environment variables and open a new window. A terminal inside an editor takes its PATH from the editor, so restart VS Code as well.
The 32-bit message also shows up on a 64-bit machine if you started the Windows PowerShell x86 entry from the Start menu. Open the plain entry without x86. For the locked file, close other installer windows, delete %USERPROFILE%\.claude\downloads and run the installer again.
A few more issues are specific to Windows. An older Claude Desktop app can take over the claude command, and updating it fixes that. If claude.exe disappears right after an update, the same folder holds a backup whose name starts with claude.exe.old. and you can rename it back. In WSL 1 an Exec format error goes away when you convert the distribution to WSL 2 with wsl --set-version and the distribution name. When no browser opens for login in WSL 2, press c, open the copied address in your Windows browser and paste the code back into the terminal.
Updates, stored login and uninstalling
The native install updates itself in the background, and claude update does it immediately. Claude Code stores your login in %USERPROFILE%\.claude\.credentials.json, which inherits the access controls of your user profile. One shortcut works differently than on a Mac. You paste an image from the clipboard into Claude Code with Alt+V.
Remove a native install in PowerShell.
Remove-Item -Path "$env:USERPROFILE\.local\bin\claude.exe" -Force
Remove-Item -Path "$env:USERPROFILE\.local\share\claude" -Recurse -ForceFor WinGet it is winget uninstall Anthropic.ClaudeCode. Settings and history stay in %USERPROFILE%\.claude and in %USERPROFILE%\.claude.json. Delete them only if you are fine losing saved approvals, MCP servers and session history.
After installing, go on to first run and login. If you picked WSL, the Linux install guide helps too, and the approval rules are explained in Claude Code permissions.
Check the prompt before you install and paste the command for the right shell, which saves you most of the trouble. If you want to know where AI could help your business beyond programming, our free AI audit shows which work it can take off your hands.
What would you like to change in your business?
Leave your number. We will talk about your process and see whether we can help. The first call is free.
The service this text is about
Automation and AI / OCRAutomation of document re-typing, OCR and checking rules, and your data stays with you.