jpskill.com
🛠️ 開発・MCP コミュニティ

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本体の挙動とは独立した参考情報です。

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o powershell-security-hardening.zip https://jpskill.com/download/6715.zip && unzip -o powershell-security-hardening.zip && rm powershell-security-hardening.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/6715.zip -OutFile "$d\powershell-security-hardening.zip"; Expand-Archive "$d\powershell-security-hardening.zip" -DestinationPath $d -Force; ri "$d\powershell-security-hardening.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して powershell-security-hardening.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → powershell-security-hardening フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

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ログ設定

  1. GPO経由でスクリプトブロックログを有効にします
  2. 主要モジュールに対してモジュールログを有効にします
  3. 安全な場所へのトランスクリプションを構成します
  4. 保護されたイベントログ転送を設定します
  5. 不審なパターンに対するアラートを作成します
  6. サンプルスクリプトでログ記録をテストします

2. JEA構成

  1. ロール機能ファイルを定義します
  2. 許可されたコマンドレットとパラメーターを指定します
  3. セッション構成を作成します
  4. JEAエンドポイントを登録します
  5. 制限付きユーザーアカウントでテストします
  6. ロール割り当てを文書化します

3. 制約付き言語モード

  1. アプリケーション要件を評価します
  2. AppLocker/WDACポリシーを作成します
  3. 信頼されていないスクリプトに対してCLMを有効にします
  4. 必要なスクリプトをホワイトリストに登録します
  5. アプリケーション機能をテストします
  6. バイパス試行を監視します

ベストプラクティス

  • すべてのシステムでスクリプトブロックログを有効にします
  • 完全な管理者権限の代わりに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

  1. Enable Script Block Logging via GPO
  2. Enable Module Logging for key modules
  3. Configure transcription to secure location
  4. Set up protected event log forwarding
  5. Create alerts for suspicious patterns
  6. Test logging with sample scripts

2. JEA Configuration

  1. Define role capabilities file
  2. Specify allowed cmdlets and parameters
  3. Create session configuration
  4. Register JEA endpoint
  5. Test with limited user account
  6. Document role assignments

3. Constrained Language Mode

  1. Assess application requirements
  2. Create AppLocker/WDAC policy
  3. Enable CLM for untrusted scripts
  4. Whitelist required scripts
  5. Test application functionality
  6. 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