Option 1: put PowerShell back on PATH
Its default folder is C:\Windows\System32\WindowsPowerShell\v1.0\. Add that folder to your PATH, or install PowerShell 7, which provides pwsh.
Option 2: install Git for Windows
Download it from git-scm.com/downloads/win and choose "Add to PATH" during setup. Restart your terminal afterwards. This also enables Claude Code's Bash tool.
Option 3: Git is installed but not found
Without CLAUDE_CODE_GIT_BASH_PATH, Claude Code looks for bash.exe in C:\Program Files\Git and C:\Program Files (x86)\Git, then via the git on your PATH. It skips a git inside the folder you launched from, or under a path containing node_modules, .venv or env. Find yours and point Claude Code at it:
where.exe git
Then in settings.json, using the bin\bash.exe of that install:
{
"env": {
"CLAUDE_CODE_GIT_BASH_PATH": "C:\\Program Files\\Git\\bin\\bash.exe"
}
}
Set, but still ignored?
- The file must be named
bash.exe,sh.exe,bashorsh. Pointing atgit-bash.exe(the launcher) is ignored, and so is a path that does not exist; run with--debugto see the warning. - If the name is right, endpoint security (AppLocker, Group Policy, EDR) may be blocking it. Ask IT to allowlist
claude.exeand the processes it starts, includingcmd.exeandbash.exe.
Other Claude Code install errors on Windows
- Full guide: install Claude Code on Windows
- 'irm' is not recognized / The token '&&' is not a valid statement separator
- 'claude' is not recognized after install or after an update
- running scripts is disabled on this system (npm install)
- < 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.