windows-hardening
Teaches your AI agent to protect apps against attacks and build APIs and back-end systems.
What it does
This agent helps make Windows servers more secure. It adjusts important settings to protect the system against attacks and unauthorized access, following security recommendations.
When to use it
- ✓When setting up a new Windows server.
- ✓When reviewing the security of existing servers.
- ✓After a major Windows update.
Example of what to ask your AI
“Make my Windows server more secure following best practices.”
Want more? Open the sections below.
How to use
The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.
Skill link
Ready-to-paste message
How it works
The agent applies pre-defined security configurations, such as stronger password policies, disabling unnecessary features, and enabling protections against known threats.
Installation
Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.
In the terminal (Claude Code, Codex, Cursor), in your project folder:
npx skills add sickn33/agentic-awesome-skills --skill windows-hardeningOr download just the file:
curl -L https://raw.githubusercontent.com/sickn33/agentic-awesome-skills/main/plugins/agentic-awesome-skills-claude/skills/windows-hardening/SKILL.md -o SKILL.mdTechnical content (original SKILL.md)
Original text by the author, straight from GitHub.
Windows Hardening
Secure Windows servers following Microsoft security baselines and CIS benchmarks.
Prerequisites
- Windows Server 2019 or later (2022 recommended)
- Local Administrator or Domain Admin access
- PowerShell 5.1+ (built into Windows Server)
- Group Policy Management Console for domain environments
- Microsoft Security Compliance Toolkit (recommended)
Security Baseline Deployment
# Download and apply Microsoft Security Baseline
# Download from: https://www.microsoft.com/en-us/download/details.aspx?id=55319
# Install Security Compliance Toolkit modules
Install-Module -Name SecurityPolicyDsc -Force
Install-Module -Name AuditPolicyDsc -Force
Install-Module -Name PSDesiredStateConfiguration -Force
# Import and apply a security baseline GPO (from Security Compliance Toolkit)
# Extract the toolkit, then:
Import-Module "$env:USERPROFILE\Downloads\SCT\LGPO.exe"
# Apply local group policy from baseline
.\LGPO.exe /g ".\GPO\{baseline-gpo-guid}"
# Export current security policy for review
secedit /export /cfg C:\SecurityAudit\current-policy.inf
Account Policies
# ============================================
# Password Policy Configuration
# ============================================
# Set password policy via net accounts
net accounts /minpwlen:14 /maxpwage:90 /minpwage:1 /uniquepw:24
# Or configure via PowerShell DSC
Configuration PasswordPolicy {
Import-DscResource -ModuleName SecurityPolicyDsc
Node localhost {
AccountPolicy PasswordPolicy {
Name = "PasswordPolicy"
Minimum_Password_Length = 14
Maximum_Password_Age = 90
Minimum_Password_Age = 1
Enforce_password_history = 24
Password_must_meet_complexity_requirements = "Enabled"
Store_passwords_using_reversible_encryption = "Disabled"
}
}
}
# ============================================
# Account Lockout Policy
# ============================================
net accounts /lockoutthreshold:5 /lockoutwindow:30 /lockoutduration:30
# ============================================
# User Account Hardening
# ============================================
# Rename and disable default accounts
Rename-LocalUser -Name "Administrator" -NewName "LocalAdmin"
Disable-LocalUser -Name "Guest"
Disable-LocalUser -Name "DefaultAccount"
# Remove unnecessary local accounts
$unnecessaryAccounts = Get-LocalUser | Where-Object {
$_.Enabled -eq $true -and
$_.Name -notin @("LocalAdmin", "SYSTEM", "NetworkService", "LocalService")
}
foreach ($account in $unnecessaryAccounts) {
Write-Host "Review account: $($account.Name) - Last logon: $($account.LastLogon)"
}
# Configure Local Administrator Password Solution (LAPS)
# Install LAPS module
Install-WindowsFeature -Name RSAT-AD-PowerShell
Import-Module AdmPwd.PS
# Configure LAPS for the OU
Set-AdmPwdComputerSelfPermission -OrgUnit "OU=Servers,DC=example,DC=com"
Set-AdmPwdReadPasswordPermission -OrgUnit "OU=Servers,DC=example,DC=com" -AllowedPrincipals "Domain Admins"
Group Policy Security Settings
# ============================================
# User Rights Assignment (via GPO or local policy)
# ============================================
# Restrict remote desktop access
# Computer Configuration > Policies > Windows Settings > Security Settings > Local Policies > User Rights Assignment
# "Allow log on through Remote Desktop Services" = Administrators, Remote Desktop Users
# Deny log on locally for service accounts
# "Deny log on locally" = Service accounts
# Configure via registry (alternative to GPO)
# Restrict anonymous enumeration of SAM accounts
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Lsa" `
-Name "RestrictAnonymousSAM" -Value 1
# Restrict anonymous enumeration of shares
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Lsa" `
-Name "RestrictAnonymous" -Value 1
# Do not display last user name
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" `
-Name "DontDisplayLastUserName" -Value 1
# ============================================
# Security Options
# ============================================
# Disable SMBv1 (critical security hardening)
Disable-WindowsOptionalFeature -Online -FeatureName SMB1Protocol -NoRestart
…
FAQ
Do I need technical knowledge to use it?
No, the agent is designed to be used even without prior knowledge of programming or complex Windows configurations.
Which Windows versions are compatible?
It works best with recent Windows Server versions, such as 2019 or 2022.
What are 'CIS benchmarks' and 'security baselines'?
These are sets of security recommendations and configurations created by experts to protect operating systems and software.
Details
Original description by the author
Harden Windows servers per security baselines and CIS benchmarks. Configure Group Policy, Windows Defender, and security features. Use when securing Windows Server environments.
Popularity
- GitHub stars
- 48k
- Ranking position
- #4572
- License
- MIT
- Updated
- 10/15/2026
Comments
- …
More skills from this repository
00-andruia-consultant
Helps your agent start or improve AI projects. It analyzes code, suggests tools, and creates action plans in Spanish.
sickn33/agentic-awesome-skills
007
Lets your agent perform security audits and threat modeling. It's useful for protecting projects against attacks and vulnerabilities.
sickn33/agentic-awesome-skills
10-andruia-skill-smith
Helps your agent create or improve AI tools. It defines how tools work, writes documentation, and validates the structure.
sickn33/agentic-awesome-skills
20-andruia-niche-intelligence
Lets your agent create a summary about a specific industry. It's useful for understanding the context, rules, usage patterns, and risks of a project, using reliable sources.
sickn33/agentic-awesome-skills
Similar skills
django-security
Helps your agent implement security practices in Django applications. It focuses on authentication, authorization, and prevention against common attacks, ensuring more secure code.
affaan-m/ECC
laravel-security
Helps your agent secure Laravel applications against threats. Implements security practices for authentication, authorization, and common attack prevention.
affaan-m/ECC
module-regression
Helps your agent manage changes in large projects. Ensures code changes in one part don't break other parts.
affaan-m/ECC