界面已本地化;技能介绍与说明文档按所选语言由 AI 自动翻译,代码、命令、路径和专业术语保留原文,以原作者文档为准。
探索技能
数据与研究 · SKILL.md

windows-ps-security

windows-ps-security

【数据与研究】Use when hardening Windows systems via PowerShell — Windows Firewall (NetSecurity), Windows Defender/Microsoft Defender, BitLocker drive encryption, audit policy and event log analysis, local security policy, credential management (SecureString, Windows Credential Manager), AppLocker, Windows Update management, and security compliance scanning. Part …

独立 GitHub 快照 · 自动分类 · 以原作者文档为准

技能说明

GitHub

name: windows-ps-security description: Use when hardening Windows systems via PowerShell — Windows Firewall (NetSecurity), Windows Defender/Microsoft Defender, BitLocker drive encryption, audit policy and event log analysis, local security policy, credential management (SecureString, Windows Credential Manager), AppLocker, Windows Update management, and security compliance scanning. Part of the windows-ps-* skill family. family: windows

Windows Security Administration via PowerShell

Companion skill to windows-powershell (parent). Focused on security hardening, compliance, and threat mitigation on Windows 10/11 and Windows Server 2019/2022/2025.


Reference Files

Detailed code examples, patterns, and configuration are in the reference files below. Read the relevant file when working on that area.

FileCovers
credentials-applocker-compliance.mdcredential management, AppLocker, local security policy, Windows Update management, security compliance, network security, user account security, and the quick security audit script
firewall-defender-bitlocker-audit.mdWindows Firewall (NetSecurity), Windows Defender/Microsoft Defender, BitLocker drive encryption, and audit policy/event log analysis


Anti-Patterns

Anti-PatternWhy It FailsCorrect Approach
Disabling UAC or Windows Defender for "convenience"Removes primary defense layers; malware runs with full privileges; fails every security auditConfigure exclusions for specific paths/processes; use GPO to manage settings rather than disabling wholesale
Storing passwords in scripts as plain textScripts in SCM, shared drives, or backup tapes expose credentials; single compromise escalates to domain adminUse Get-Credential, SecureString, or external vaults (Azure Key Vault, CyberArk); never hardcode credentials
Not enabling PowerShell ScriptBlock loggingNo visibility into what scripts execute; incident response has no forensic trail; attackers operate undetectedEnable ScriptBlock and Module logging via GPO; forward to SIEM; essential for detecting encoded/obfuscated attacks
Using NTLM authentication instead of KerberosNTLM is vulnerable to relay attacks, pass-the-hash, and brute force; cannot use modern security featuresRestrict NTLM via GPO (Network security: Restrict NTLM); audit NTLM usage first, then block progressively
Running PowerShell remoting without JEA (Just Enough Administration)Full administrative sessions over WinRM; any command can be executed; no command-level access controlConfigure JEA endpoints with role capabilities; limit available cmdlets and parameters per role

Related Skills

SkillScope
windows-powershellParent skill — core PowerShell syntax, modules, remoting, scripting patterns
windows-ps-server-adminWindows Server roles (AD DS, DNS, DHCP, IIS, Hyper-V, clustering)
windows-cmdLegacy CMD commands, batch scripting, low-level system tools
我的收藏