powershell-security-hardening
Windowsシステムのセキュリティ強化とPowerShell環境の安全な自動化を、最小権限の原則に基づき企業基準に沿って設定するSkill。
📜 元の英語説明(参考)
Expert in Windows security hardening and PowerShell security configuration. Specializes in securing automation, enforcing least privilege, and aligning with enterprise security baselines. Use for securing PowerShell environments and Windows systems. Triggers include "PowerShell security", "constrained language mode", "JEA", "execution policy", "security baseline", "PowerShell logging".
🇯🇵 日本人クリエイター向け解説
Windowsシステムのセキュリティ強化とPowerShell環境の安全な自動化を、最小権限の原則に基づき企業基準に沿って設定するSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-17
- 取得日時
- 2026-05-17
- 同梱ファイル
- 1
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
PowerShellセキュリティ強化
目的
Windowsのセキュリティ強化とPowerShellのセキュリティ構成に関する専門知識を提供します。自動化スクリプトの保護、Just Enough Administration (JEA) の実装、最小特権の強制、およびエンタープライズのセキュリティベースラインへの準拠を専門としています。
使用場面
- PowerShellセキュリティポリシーの構成
- 制約付き言語モード (Constrained Language Mode) の実装
- Just Enough Administration (JEA) のセットアップ
- PowerShellのログ記録と監査の有効化
- 自動化資格情報の保護
- CIS/STIGベースラインの適用
- PowerShell攻撃からの保護
- 実行ポリシーの実装
クイックスタート
このスキルを呼び出すのは、次の場合です。
- PowerShell環境の強化
- JEAまたは制約付き言語モードの実装
- PowerShellログの構成
- 自動化資格情報の保護
- セキュリティベースラインの適用
呼び出さないのは、次の場合です。
- 一般的なWindows管理 →
/windows-infra-adminを使用してください - PowerShell開発 →
/powershell-7-expertを使用してください - Active Directoryセキュリティ →
/ad-security-reviewerを使用してください - ネットワークセキュリティ →
/network-engineerを使用してください
意思決定フレームワーク
Security Requirement?
├── Script Execution Control
│ ├── Basic → Execution Policy
│ └── Strict → AppLocker/WDAC
├── Language Restriction
│ └── Constrained Language Mode
├── Privilege Reduction
│ └── JEA (Just Enough Administration)
└── Auditing
└── Script Block Logging + Transcription
主要なワークフロー
1. PowerShellログ設定
- GPO経由でスクリプトブロックログを有効にします
- 主要モジュールに対してモジュールログを有効にします
- 安全な場所へのトランスクリプションを構成します
- 保護されたイベントログ転送を設定します
- 不審なパターンに対するアラートを作成します
- サンプルスクリプトでログ記録をテストします
2. JEA構成
- ロール機能ファイルを定義します
- 許可されたコマンドレットとパラメーターを指定します
- セッション構成を作成します
- JEAエンドポイントを登録します
- 制限付きユーザーアカウントでテストします
- ロール割り当てを文書化します
3. 制約付き言語モード
- アプリケーション要件を評価します
- AppLocker/WDACポリシーを作成します
- 信頼されていないスクリプトに対してCLMを有効にします
- 必要なスクリプトをホワイトリストに登録します
- アプリケーション機能をテストします
- バイパス試行を監視します
ベストプラクティス
- すべてのシステムでスクリプトブロックログを有効にします
- 完全な管理者権限の代わりにJEAを使用します
- 資格情報をスクリプトではなく安全なボールトに保存します
- マルウェア検出のためにAMSIを適用します
- AllSignedポリシーで署名済みスクリプトを使用します
- PowerShellの使用ログを定期的に監査します
アンチパターン
| アンチパターン | 問題点 | 正しいアプローチ |
|---|---|---|
| スクリプト内の資格情報 | 漏洩リスク | SecretManagement vault |
| ログ記録の無効化 | 可視性なし | すべてのログ記録を有効にする |
| 実行ポリシーのバイパス | セキュリティの形骸化 | AppLocker/WDAC |
| 自動化に完全な管理者権限 | 過剰な特権 | 最小限の権限を持つJEA |
| AMSIの無視 | マルウェアの盲点 | AMSIを有効に保つ |
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
PowerShell Security Hardening
Purpose
Provides expertise in Windows security hardening and PowerShell security configuration. Specializes in securing automation scripts, implementing Just Enough Administration (JEA), enforcing least privilege, and aligning with enterprise security baselines.
When to Use
- Configuring PowerShell security policies
- Implementing Constrained Language Mode
- Setting up Just Enough Administration (JEA)
- Enabling PowerShell logging and auditing
- Securing automation credentials
- Applying CIS/STIG baselines
- Protecting against PowerShell attacks
- Implementing execution policies
Quick Start
Invoke this skill when:
- Hardening PowerShell environments
- Implementing JEA or constrained language mode
- Configuring PowerShell logging
- Securing automation credentials
- Applying security baselines
Do NOT invoke when:
- General Windows administration → use
/windows-infra-admin - PowerShell development → use
/powershell-7-expert - Active Directory security → use
/ad-security-reviewer - Network security → use
/network-engineer
Decision Framework
Security Requirement?
├── Script Execution Control
│ ├── Basic → Execution Policy
│ └── Strict → AppLocker/WDAC
├── Language Restriction
│ └── Constrained Language Mode
├── Privilege Reduction
│ └── JEA (Just Enough Administration)
└── Auditing
└── Script Block Logging + Transcription
Core Workflows
1. PowerShell Logging Setup
- Enable Script Block Logging via GPO
- Enable Module Logging for key modules
- Configure transcription to secure location
- Set up protected event log forwarding
- Create alerts for suspicious patterns
- Test logging with sample scripts
2. JEA Configuration
- Define role capabilities file
- Specify allowed cmdlets and parameters
- Create session configuration
- Register JEA endpoint
- Test with limited user account
- Document role assignments
3. Constrained Language Mode
- Assess application requirements
- Create AppLocker/WDAC policy
- Enable CLM for untrusted scripts
- Whitelist required scripts
- Test application functionality
- Monitor for bypass attempts
Best Practices
- Enable script block logging on all systems
- Use JEA instead of full admin rights
- Store credentials in secure vault (not scripts)
- Apply AMSI for malware detection
- Use signed scripts with AllSigned policy
- Regularly audit PowerShell usage logs
Anti-Patterns
| Anti-Pattern | Problem | Correct Approach |
|---|---|---|
| Credentials in scripts | Exposure risk | SecretManagement vault |
| Disabled logging | No visibility | Enable all logging |
| Bypass execution policy | Security theater | AppLocker/WDAC |
| Full admin for automation | Over-privileged | JEA with minimal rights |
| Ignoring AMSI | Malware blind spot | Keep AMSI enabled |