Agent SkillsNeverSight/learn-skills.dev › powershell-security-hardening

powershell-security-hardening

GitHub

专注于Windows和PowerShell环境的安全加固,涵盖JEA、受限语言模式、执行策略及日志审计配置,旨在实现最小权限原则并符合企业安全基线。

data/skills-md/404kidwiz/claude-supercode-skills/powershell-security-hardening/SKILL.md NeverSight/learn-skills.dev

Trigger Scenarios

PowerShell security constrained language mode JEA execution policy security baseline PowerShell logging

Install

npx skills add NeverSight/learn-skills.dev --skill powershell-security-hardening -g -y
More Options

Non-standard path

npx skills add https://github.com/NeverSight/learn-skills.dev/tree/main/data/skills-md/404kidwiz/claude-supercode-skills/powershell-security-hardening -g -y

Use without installing

npx skills use NeverSight/learn-skills.dev@powershell-security-hardening

指定 Agent (Claude Code)

npx skills add NeverSight/learn-skills.dev --skill powershell-security-hardening -a claude-code -g -y

安装 repo 全部 skill

npx skills add NeverSight/learn-skills.dev --all -g -y

预览 repo 内 skill

npx skills add NeverSight/learn-skills.dev --list

SKILL.md

Frontmatter
{
    "name": "powershell-security-hardening",
    "description": "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\"."
}

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

Version History

  • e0220ca Current 2026-07-05 21:16

Same Skill Collection

data/skills-md/00prabalk00/claude-skills/knowledge-base-gap-finder/SKILL.md
data/skills-md/01000001-01001110/agent-jira-skills/jira-agile/SKILL.md
data/skills-md/01000001-01001110/agent-jira-skills/jira-auth/SKILL.md
data/skills-md/01000001-01001110/agent-jira-skills/jira-issues/SKILL.md
data/skills-md/01000001-01001110/agent-jira-skills/jira-project-management/SKILL.md
data/skills-md/01000001-01001110/agent-jira-skills/jira-projects/SKILL.md
data/skills-md/01000001-01001110/agent-jira-skills/jira-safe/SKILL.md
data/skills-md/01000001-01001110/agent-jira-skills/jira-search/SKILL.md
data/skills-md/01000001-01001110/agent-jira-skills/jira-spaces/SKILL.md
data/skills-md/01000001-01001110/agent-jira-skills/jira-transitions/SKILL.md
data/skills-md/0731coderlee-sudo/wechat-publisher/wechat-publisher/SKILL.md
data/skills-md/0froq/skills/conventionalcommits/SKILL.md
data/skills-md/0froq/skills/nuxt/SKILL.md
data/skills-md/0froq/skills/oq/SKILL.md
data/skills-md/0froq/skills/pinia/SKILL.md
data/skills-md/0froq/skills/pnpm/SKILL.md
data/skills-md/0froq/skills/slidev/SKILL.md
data/skills-md/0froq/skills/tsdown/SKILL.md
data/skills-md/0froq/skills/turborepo/SKILL.md
data/skills-md/0froq/skills/unocss/SKILL.md
data/skills-md/0froq/skills/vitepress/SKILL.md
data/skills-md/0froq/skills/vitest/SKILL.md
data/skills-md/0froq/skills/vue-best-practices/SKILL.md
data/skills-md/0froq/skills/vue-router-best-practices/SKILL.md
data/skills-md/0froq/skills/vue-testing-best-practices/SKILL.md
data/skills-md/0froq/skills/vue/SKILL.md
data/skills-md/0froq/skills/vueuse-functions/SKILL.md
data/skills-md/0froq/skills/web-design-guidelines/SKILL.md
data/skills-md/0juano/agent-skills/bondterminal-x402/SKILL.md
data/skills-md/0juano/agent-skills/edgeone-pages-deploy/SKILL.md
data/skills-md/0juano/agent-skills/ley-ar/SKILL.md
data/skills-md/0juano/agent-skills/ticktick/SKILL.md
data/skills-md/0juano/agent-skills/x-image-cards/SKILL.md
data/skills-md/0juano/x-image-cards/x-image-cards/SKILL.md
data/skills-md/0x0funky/agent-sprite-forge/generate2dsprite/SKILL.md
data/skills-md/0x0funky/agent-sprite-forge/video2dsprite/SKILL.md
data/skills-md/0x2e/superpowers/brainstorming/SKILL.md
data/skills-md/0x2e/superpowers/dispatching-parallel-agents/SKILL.md
data/skills-md/0x2e/superpowers/executing-plans/SKILL.md
data/skills-md/0x2e/superpowers/finishing-a-development-branch/SKILL.md
data/skills-md/0x2e/superpowers/receiving-code-review/SKILL.md
data/skills-md/0x2e/superpowers/requesting-code-review/SKILL.md
data/skills-md/0x2e/superpowers/subagent-driven-development/SKILL.md
data/skills-md/0x2e/superpowers/systematic-debugging/SKILL.md
data/skills-md/0x2e/superpowers/test-driven-development/SKILL.md
data/skills-md/0x2e/superpowers/using-git-worktrees/SKILL.md
data/skills-md/0x2e/superpowers/using-superpowers/SKILL.md
data/skills-md/0x2e/superpowers/verification-before-completion/SKILL.md
data/skills-md/0x2e/superpowers/writing-plans/SKILL.md
data/skills-md/0x2e/superpowers/writing-skills/SKILL.md

Metadata

Files
0
Version
f4b4cf1
Hash
363c1db8
Indexed
2026-07-05 21:16

trang chủ - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-09 02:01
浙ICP备14020137号-1 $bản đồ khách truy cập$