環境変数

CLAUDE_CODE_USE_POWERSHELL_TOOL

PowerShell ツールの有効化を制御し、Windows 環境で Git Bash を介さずにネイティブなコマンド実行を可能にします。

使い方・用途

  • Windows 固有のシステム管理や PowerShell スクリプトを、エミュレーターを通さず自然な形で Claude に扱わせたい場合に使用します。
  • macOS/Linux/WSL 環境においても、pwsh がインストールされていれば PowerShell をツールとして利用可能になります。
英語原文(公式ドキュメントより)

Controls the PowerShell tool. On Windows without Git Bash, the tool is enabled automatically; set to 0 to disable it. On Windows with Git Bash installed, the tool is rolling out progressively: set to 1 to opt in or 0 to opt out. On Linux, macOS, and WSL, set to 1 to enable it, which requires pwsh on your PATH. When enabled on Windows, Claude can run PowerShell commands natively instead of routing through Git Bash. See PowerShell tool

関連する変更履歴

v2.1.143(1件)

Changed
Bedrock、Vertex、FoundryユーザーのWindows環境において、PowerShellツールをデフォルトで有効化しました
英語原文を表示
The PowerShell tool is now enabled by default on Windows for Bedrock, Vertex, and Foundry users. Opt out with CLAUDE_CODE_USE_POWERSHELL_TOOL=0.

変更前

サードパーティのクラウドプロバイダーを利用しているWindowsユーザーは、手動でPowerShellツールを有効にする必要がありました。

変更後

特別な設定なしでPowerShellを介した操作が可能になります(CLAUDE_CODE_USE_POWERSHELL_TOOL=0で無効化可能)。

ユーザーへの恩恵

どのプロバイダーを使用していても、Windows上での標準的なコマンド実行環境がすぐに整います。

関連ドキュメント

v2.1.111(1件)

Changed
WindowsにおいてPowerShellツールの段階的なロールアウトを開始しました。CLAUDE_CODE_USE_POWERSHELL_TOOL=1を設定することで、macOS/Linuxでもpwsh経由で利用可能です。
英語原文を表示
Windows: PowerShell tool is progressively rolling out. Opt in or out with CLAUDE_CODE_USE_POWERSHELL_TOOL. On Linux and macOS, enable with CLAUDE_CODE_USE_POWERSHELL_TOOL=1 (requires pwsh on PATH)

変更前

Windows上でも内部的にGit Bashを使用していたため、Windows固有のシステム管理やPowerShellコマンドの実行が直接的には困難でした。

変更後

ClaudeがPowerShellを直接操作できるようになり、Windowsネイティブなコマンドやスクリプトを自然な形で扱えるようになりました。

ユーザーへの恩恵

Windows環境での開発において、OSの機能をフルに活用した高度な自動化やトラブルシューティングが可能になります。

関連ドキュメント