# PowerShell Tool

> It runs PowerShell. Most of the time that is on Windows.

**Field:** Artificial Intelligence  
**Category:** Claude Code  
**Also known as:** PowerShell, CLAUDE_CODE_USE_POWERSHELL_TOOL

## Think of it like

It is like Bash, but it speaks the way Windows talks.

## Definition

The PowerShell tool runs PowerShell commands directly. On Windows without Git Bash, it is turned on by itself. On Windows with Git Bash, it is on by default for most sign-in types. On Linux and macOS, you have to turn it on. It follows the same kind of permission rules as Bash, and a deny rule on Bash turns it off too.

## Example

Lucy works on Windows with no Git Bash. Claude runs her build script through the PowerShell tool, with no extra setup.

## Example code

```bash
export CLAUDE_CODE_USE_POWERSHELL_TOOL=1
```

Turn the PowerShell tool on.

## Why it matters

Windows users get commands that run the way their system expects.

## Common mistake

Writing hooks that only check Bash. Match Bash and PowerShell, or a PowerShell command slips past.

## Three principles

- **Native PowerShell.** Not through Bash.
- **On for Windows.** Opt-in elsewhere.
- **Bash rules apply.** A Bash deny turns it off.

## Related terms

- [Bash Tool](https://learn.benibix.com/term/ai/bash-tool)
- [Shell](https://learn.benibix.com/term/infrastructure/shell)
- [Claude Code Built-in Tool](https://learn.benibix.com/term/ai/claude-code-built-in-tool)

## Taught in

- [Bash, WebFetch and WebSearch](https://learn.benibix.com/learn/ai-claude-code/bash-webfetch-and-websearch): Claude Code, 10/16

![Bash runs a command and returns its output. Monitor runs one in the background and sends each new line as it comes.](https://learn.benibix.com/diagrams/ct-shell-tools.svg)

---

Source: https://learn.benibix.com/term/ai/powershell-tool
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-17
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
