Skip to content
BENIBIX Learn

PowerShell Tool

AI⌨️ Claude CodeBuilt-in Tools

Also known as PowerShell, CLAUDE_CODE_USE_POWERSHELL_TOOL

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

Think of it like

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

Example

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

Why it matters

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

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 code

bash
export CLAUDE_CODE_USE_POWERSHELL_TOOL=1
Turn the PowerShell tool on.
On Windows, PowerShell takes the place of Bash.

Common mistake

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

Key takeaways

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

Learn it properly