[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6Q092R8NGAZXM3QB8XRSVC6":3,"skill-same:01M6Q092R8NGAZXM3QB8XRSVC6":79},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":25,"publishedAt":46,"linkOnly":47,"markdownContent":48,"markdownBody":49,"frontMatter":50,"refName":36,"commitSha":60,"skillDirectory":61,"forksCount":13,"repositoryHtmlUrl":62,"repositoryHomepageUrl":6,"ownerHtmlUrl":63,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":64,"install":65,"resources":78},"01M6Q092R8NGAZXM3QB8XRSVC6","windows-server",null,"Administer Windows Server systems. Manage IIS, Active Directory, and PowerShell automation. Use when administering Windows infrastructure.","duc-duy-1612\u002FOnline-Delivery-Systems-Web","duc-duy-1612","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F192231384?v=4","01M6NSDKQQDKVTHZ8DZMZ1VYY6","01M6NSDKW8DDVTQHBT1HBDDJPT",0,"MIT","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fwindows-server\u002FSKILL.md",[17,22],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000010","后端与接口","SCENARIO","使用场景",{"categoryNo":23,"categoryName":24,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000023","Skill与智能体开发",[26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],"windows","server","windows server","manage","relevant","scripts","critical","os","platform","active","main","community","directory","only","access","devops-security","powershell","license","infrastructure","security","2026-11-10 10:12:30",false,"---\nname: windows-server\ndescription: Administer Windows Server systems. Manage IIS, Active Directory, and\n  PowerShell automation. Use when administering Windows infrastructure.\ncategory: devops\nrisk: critical\nsource: https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills\nsource_repo: BagelHole\u002FDevOps-Security-Agent-Skills\nsource_type: community\ndate_added: '2026-09-20'\nlicense: MIT\nlicense_source: https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills\u002Fblob\u002Fmain\u002FLICENSE\ncompatibility: Requires the relevant OS\u002Fplatform tooling and privileged access where\n  noted. Docs-only; helper scripts and templates not bundled.\nmetadata:\n  author: devops-skills\n  version: '1.0'\n---\n\n# Windows Server Administration\n\nWindows Server management and PowerShell automation for production workloads including IIS web hosting, Active Directory domain services, and system maintenance.\n\n## When to Use\n\n- Provisioning or configuring Windows Server 2019\u002F2022 instances\n- Setting up IIS websites, application pools, and bindings\n- Managing Active Directory users, groups, and Group Policy\n- Automating administrative tasks with PowerShell\n- Reviewing Windows Event Logs for troubleshooting\n- Applying and managing Windows Updates on servers\n\n## Prerequisites\n\n- Administrator account on the target server\n- PowerShell 5.1+ (built-in) or PowerShell 7+ installed\n- Remote Desktop or WinRM access configured\n- Windows Server 2019 or 2022 (Desktop Experience or Server Core)\n\n## PowerShell Administration Essentials\n\n```powershell\n# Check PowerShell version\n$PSVersionTable.PSVersion\n\n# Get system information\nGet-ComputerInfo | Select-Object CsName, OsName, OsVersion, OsArchitecture\n\n# List running processes sorted by CPU\nGet-Process | Sort-Object CPU -Descending | Select-Object -First 20\n\n# List all services and their status\nGet-Service | Where-Object { $_.Status -eq 'Running' }\n\n# Restart a service\nRestart-Service -Name W3SVC -Force\n\n# Get disk space on all drives\nGet-PSDrive -PSProvider FileSystem | Select-Object Name, @{N='Used(GB)';E={[math]::Round($_.Used\u002F1GB,2)}}, @{N='Free(GB)';E={[math]::Round($_.Free\u002F1GB,2)}}\n\n# Check uptime\n(Get-Date) - (Get-CimInstance Win32_OperatingSystem).LastBootUpTime\n\n# Open firewall port\nNew-NetFirewallRule -DisplayName \"Allow HTTPS\" -Direction Inbound -Protocol TCP -LocalPort 443 -Action Allow\n\n# List firewall rules\nGet-NetFirewallRule | Where-Object { $_.Enabled -eq 'True' -and $_.Direction -eq 'Inbound' } | Select-Object DisplayName, Action\n\n# Set DNS client server addresses\nSet-DnsClientServerAddress -InterfaceAlias \"Ethernet\" -ServerAddresses (\"10.0.0.2\",\"10.0.0.3\")\n\n# PowerShell remoting to another server\nEnter-PSSession -ComputerName server02 -Credential (Get-Credential)\n\n# Run a command on multiple remote servers\nInvoke-Command -ComputerName server01,server02,server03 -ScriptBlock { Get-Service W3SVC }\n```\n\n## Server Roles and Features\n\n```powershell\n# List all available roles and features\nGet-WindowsFeature\n\n# Install IIS with management tools\nInstall-WindowsFeature -Name Web-Server -IncludeManagementTools -IncludeAllSubFeature\n\n# Install Active Directory Domain Services\nInstall-WindowsFeature -Name AD-Domain-Services -IncludeManagementTools\n\n# Install DNS Server\nInstall-WindowsFeature -Name DNS -IncludeManagementTools\n\n# Install DHCP Server\nInstall-WindowsFeature -Name DHCP -IncludeManagementTools\n\n# Install File Server with deduplication\nInstall-WindowsFeature -Name FS-FileServer, FS-Data-Deduplication\n\n# List installed features only\nGet-WindowsFeature | Where-Object Installed | Select-Object Name, InstallState\n\n# Remove a feature\nUninstall-WindowsFeature -Name Telnet-Client\n```\n\n## IIS Web Server Setup\n\n```powershell\n# Import the IIS administration module\nImport-Module WebAdministration\n\n# Create a new application pool\nNew-WebAppPool -Name \"ProductionPool\"\nSet-ItemProperty IIS:\\AppPools\\ProductionPool -Name processModel.identityType -Value 3  # NetworkService\nSet-ItemProperty IIS:\\AppPools\\ProductionPool -Name managedRuntimeVersion -Value \"\"     # No managed code (reverse proxy)\n\n# Create a new website\nNew-Website -Name \"MyApp\" `\n  -Port 443 `\n  -Protocol https `\n  -PhysicalPath \"C:\\inetpub\\myapp\" `\n  -ApplicationPool \"ProductionPool\" `\n  -SslFlags 1\n\n# Add an HTTP binding that redirects to HTTPS\nNew-WebBinding -Name \"MyApp\" -Protocol http -Port 80\n\n# Bind an SSL certificate to the HTTPS site\n$cert = Get-ChildItem -Path Cert:\\LocalMachine\\My | Where-Object { $_.Subject -like \"*example.com*\" }\nNew-Item IIS:\\SslBindings\\0.0.0.0!443 -Value $cert\n\n# Create a virtual directory\nNew-WebVirtualDirectory -Site \"MyApp\" -Name \"static\" -PhysicalPath \"C:\\inetpub\\static\"\n\n# Start, stop, and restart a site\nStart-Website -Name \"MyApp\"\nStop-Website  -Name \"MyApp\"\nRestart-WebAppPool -Name \"ProductionPool\"\n\n# List all websites and their state\nGet-Website | Select-Object Name, State, PhysicalPath, @{N='Bindings';E={$_.Bindings.Collection.bindingInformation}}\n\n# Enable IIS logging with W3C format\nSet-WebConfigurationProperty -PSPath \"IIS:\\Sites\\MyApp\" `\n  -Filter \"system.webServer\u002FhttpLogging\" `\n  -Name \"dontLog\" -Value $false\n\n# URL Rewrite: redirect HTTP to HTTPS (requires URL Rewrite module)\n# web.config rule:\n@'\n\u003Crule name=\"HTTP to HTTPS\" stopProcessing=\"true\">\n  \u003Cmatch url=\"(.*)\" \u002F>\n  \u003Cconditions>\n    \u003Cadd input=\"{HTTPS}\" pattern=\"off\" \u002F>\n  \u003C\u002Fconditions>\n  \u003Caction type=\"Redirect\" url=\"https:\u002F\u002F{HTTP_HOST}\u002F{R:1}\" redirectType=\"Permanent\" \u002F>\n\u003C\u002Frule>\n'@\n```\n\n## Active Directory Basics\n\n```powershell\n# Promote server to a new domain controller in a new forest\nInstall-ADDSForest `\n  -DomainName \"corp.example.com\" `\n  -DomainNetBIOSName \"CORP\" `\n  -InstallDns:$true `\n  -SafeModeAdministratorPassword (ConvertTo-SecureString \"P@ssw0rd!\" -AsPlainText -Force) `\n  -Force:$true\n\n# Create an Organizational Unit\nNew-ADOrganizationalUnit -Name \"Engineering\" -Path \"DC=corp,DC=example,DC=com\"\n\n# Create a new AD user\nNew-ADUser -Name \"Jane Smith\" `\n  -SamAccountName \"jsmith\" `\n  -UserPrincipalName \"jsmith@corp.example.com\" `\n  -Path \"OU=Engineering,DC=corp,DC=example,DC=com\" `\n  -AccountPassword (ConvertTo-SecureString \"TempP@ss1\" -AsPlainText -Force) `\n  -Enabled $true `\n  -ChangePasswordAtLogon $true\n\n# Add user to a group\nAdd-ADGroupMember -Identity \"Domain Admins\" -Members \"jsmith\"\n\n# Search for users in an OU\nGet-ADUser -Filter * -SearchBase \"OU=Engineering,DC=corp,DC=example,DC=com\" | Select-Object Name, SamAccountName, Enabled\n\n# Disable a user account\nDisable-ADAccount -Identity \"jsmith\"\n\n# Unlock a locked-out account\nUnlock-ADAccount -Identity \"jsmith\"\n\n# Reset a user password\nSet-ADAccountPassword -Identity \"jsmith\" -Reset -NewPassword (ConvertTo-SecureString \"NewP@ss1\" -AsPlainText -Force)\n\n# List all domain controllers\nGet-ADDomainController -Filter * | Select-Object Name, IPv4Address, Site\n\n# Check AD replication status\nGet-ADReplicationPartnerMetadata -Target \"dc01.corp.example.com\"\nrepadmin \u002Freplsummary\n```\n\n## Windows Update Management\n\n```powershell\n# Install the PSWindowsUpdate module (from PowerShell Gallery)\nInstall-Module -Name PSWindowsUpdate -Force\n\n# Check for available updates\nGet-WindowsUpdate\n\n# Install all available updates (auto-reboot if needed)\nInstall-WindowsUpdate -AcceptAll -AutoReboot\n\n# Install only critical and security updates\nInstall-WindowsUpdate -Category \"Security Updates\",\"Critical Updates\" -AcceptAll\n\n# View update history\nGet-WUHistory | Select-Object -First 20 Title, Date, Result\n\n# Schedule monthly patching via Task Scheduler\n$action  = New-ScheduledTaskAction -Execute \"powershell.exe\" `\n  -Argument \"-NoProfile -Command Install-WindowsUpdate -AcceptAll -AutoReboot\"\n$trigger = New-ScheduledTaskTrigger -Weekly -DaysOfWeek Sunday -At 2am\nRegister-ScheduledTask -TaskName \"MonthlyPatching\" -Action $action -Trigger $trigger -User \"SYSTEM\" -RunLevel Highest\n\n# WSUS configuration via Group Policy (registry keys)\n# HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\WindowsUpdate\n# WUServer = http:\u002F\u002Fwsus.corp.example.com:8530\n# WUStatusServer = http:\u002F\u002Fwsus.corp.example.com:8530\n```\n\n## Event Log Analysis\n\n```powershell\n# View the 50 most recent System log errors\nGet-EventLog -LogName System -EntryType Error -Newest 50\n\n# Search for specific event IDs (e.g., unexpected shutdowns = 6008)\nGet-EventLog -LogName System -InstanceId 6008\n\n# Use Get-WinEvent for advanced filtering (newer cmdlet)\nGet-WinEvent -FilterHashtable @{\n    LogName   = 'Application'\n    Level     = 2   # Error\n    StartTime = (Get-Date).AddDays(-1)\n} | Select-Object TimeCreated, Id, Message -First 20\n\n# Search Security log for failed logons (Event ID 4625)\nGet-WinEvent -FilterHashtable @{\n    LogName = 'Security'\n    Id      = 4625\n} | Select-Object TimeCreated, @{N='Account';E={$_.Properties[5].Value}}, @{N='Source';E={$_.Properties[19].Value}} -First 30\n\n# Export events to CSV for analysis\nGet-WinEvent -FilterHashtable @{ LogName='System'; Level=1,2 } |\n  Export-Csv -Path C:\\Logs\\system-errors.csv -NoTypeInformation\n\n# Clear old event log entries (use cautiously)\nClear-EventLog -LogName Application\n\n# Set maximum log size\nLimit-EventLog -LogName Application -MaximumSize 512MB -OverflowAction OverwriteAsNeeded\n```\n\n## Scheduled Tasks\n\n```powershell\n# Create a scheduled task to run a script daily at 3 AM\n$action  = New-ScheduledTaskAction -Execute \"powershell.exe\" `\n  -Argument \"-NoProfile -File C:\\Scripts\\daily-maintenance.ps1\"\n$trigger = New-ScheduledTaskTrigger -Daily -At 3am\n$settings = New-ScheduledTaskSettingsSet -StartWhenAvailable -DontStopOnIdleEnd\nRegister-ScheduledTask -TaskName \"DailyMaintenance\" -Action $action -Trigger $trigger -Settings $settings -User \"SYSTEM\"\n\n# List all scheduled tasks\nGet-ScheduledTask | Where-Object { $_.State -ne 'Disabled' } | Select-Object TaskName, State, TaskPath\n\n# Run a task immediately\nStart-ScheduledTask -TaskName \"DailyMaintenance\"\n\n# Disable and remove a task\nDisable-ScheduledTask -TaskName \"DailyMaintenance\"\nUnregister-ScheduledTask -TaskName \"DailyMaintenance\" -Confirm:$false\n```\n\n## Troubleshooting\n\n| Symptom | Diagnostic Command | Common Fix |\n|---|---|---|\n| IIS site returns 503 | `Get-WebAppPoolState` | Restart the application pool; check Event Log for crash |\n| High CPU on server | `Get-Process \\| Sort CPU -Desc` | Identify process; check for runaway w3wp or service |\n| Disk running low | `Get-PSDrive -PSProvider FileSystem` | Clear temp files, IIS logs, Windows Update cache |\n| AD account locked out | `Search-ADAccount -LockedOut` | `Unlock-ADAccount`; find lockout source in Security log |\n| Windows Update fails | `Get-WindowsUpdate -Verbose` | Run `sfc \u002Fscannow`, reset update components |\n| Service fails to start | `Get-EventLog -LogName System -Newest 20` | Check dependencies, credentials, and port conflicts |\n| RDP connection refused | `Get-ItemProperty 'HKLM:\\System\\...\\Terminal Server'` | Ensure RDP is enabled and firewall allows port 3389 |\n| DNS resolution fails | `Resolve-DnsName example.com` | Check DNS server settings and forwarder config |\n\n## Related Skills\n\n- `linux-administration` -- Cross-platform comparison and hybrid management\n- `ssh-configuration` -- SSH access for Windows OpenSSH Server\n- `user-management` -- Parallel concepts for Linux user\u002Fgroup management\n- `systemd-services` -- Linux equivalent of Windows Services and Task Scheduler\n- `performance-tuning` -- Performance monitoring and optimization patterns\n\n## Limitations\n\n- Infrastructure commands can disrupt services: confirm target host\u002Fscope and have backups\u002Fsnapshots before mutating state.\n- Docs-only import: upstream scripts and templates not bundled.\n\n","# Windows Server Administration\n\nWindows Server management and PowerShell automation for production workloads including IIS web hosting, Active Directory domain services, and system maintenance.\n\n## When to Use\n\n- Provisioning or configuring Windows Server 2019\u002F2022 instances\n- Setting up IIS websites, application pools, and bindings\n- Managing Active Directory users, groups, and Group Policy\n- Automating administrative tasks with PowerShell\n- Reviewing Windows Event Logs for troubleshooting\n- Applying and managing Windows Updates on servers\n\n## Prerequisites\n\n- Administrator account on the target server\n- PowerShell 5.1+ (built-in) or PowerShell 7+ installed\n- Remote Desktop or WinRM access configured\n- Windows Server 2019 or 2022 (Desktop Experience or Server Core)\n\n## PowerShell Administration Essentials\n\n```powershell\n# Check PowerShell version\n$PSVersionTable.PSVersion\n\n# Get system information\nGet-ComputerInfo | Select-Object CsName, OsName, OsVersion, OsArchitecture\n\n# List running processes sorted by CPU\nGet-Process | Sort-Object CPU -Descending | Select-Object -First 20\n\n# List all services and their status\nGet-Service | Where-Object { $_.Status -eq 'Running' }\n\n# Restart a service\nRestart-Service -Name W3SVC -Force\n\n# Get disk space on all drives\nGet-PSDrive -PSProvider FileSystem | Select-Object Name, @{N='Used(GB)';E={[math]::Round($_.Used\u002F1GB,2)}}, @{N='Free(GB)';E={[math]::Round($_.Free\u002F1GB,2)}}\n\n# Check uptime\n(Get-Date) - (Get-CimInstance Win32_OperatingSystem).LastBootUpTime\n\n# Open firewall port\nNew-NetFirewallRule -DisplayName \"Allow HTTPS\" -Direction Inbound -Protocol TCP -LocalPort 443 -Action Allow\n\n# List firewall rules\nGet-NetFirewallRule | Where-Object { $_.Enabled -eq 'True' -and $_.Direction -eq 'Inbound' } | Select-Object DisplayName, Action\n\n# Set DNS client server addresses\nSet-DnsClientServerAddress -InterfaceAlias \"Ethernet\" -ServerAddresses (\"10.0.0.2\",\"10.0.0.3\")\n\n# PowerShell remoting to another server\nEnter-PSSession -ComputerName server02 -Credential (Get-Credential)\n\n# Run a command on multiple remote servers\nInvoke-Command -ComputerName server01,server02,server03 -ScriptBlock { Get-Service W3SVC }\n```\n\n## Server Roles and Features\n\n```powershell\n# List all available roles and features\nGet-WindowsFeature\n\n# Install IIS with management tools\nInstall-WindowsFeature -Name Web-Server -IncludeManagementTools -IncludeAllSubFeature\n\n# Install Active Directory Domain Services\nInstall-WindowsFeature -Name AD-Domain-Services -IncludeManagementTools\n\n# Install DNS Server\nInstall-WindowsFeature -Name DNS -IncludeManagementTools\n\n# Install DHCP Server\nInstall-WindowsFeature -Name DHCP -IncludeManagementTools\n\n# Install File Server with deduplication\nInstall-WindowsFeature -Name FS-FileServer, FS-Data-Deduplication\n\n# List installed features only\nGet-WindowsFeature | Where-Object Installed | Select-Object Name, InstallState\n\n# Remove a feature\nUninstall-WindowsFeature -Name Telnet-Client\n```\n\n## IIS Web Server Setup\n\n```powershell\n# Import the IIS administration module\nImport-Module WebAdministration\n\n# Create a new application pool\nNew-WebAppPool -Name \"ProductionPool\"\nSet-ItemProperty IIS:\\AppPools\\ProductionPool -Name processModel.identityType -Value 3  # NetworkService\nSet-ItemProperty IIS:\\AppPools\\ProductionPool -Name managedRuntimeVersion -Value \"\"     # No managed code (reverse proxy)\n\n# Create a new website\nNew-Website -Name \"MyApp\" `\n  -Port 443 `\n  -Protocol https `\n  -PhysicalPath \"C:\\inetpub\\myapp\" `\n  -ApplicationPool \"ProductionPool\" `\n  -SslFlags 1\n\n# Add an HTTP binding that redirects to HTTPS\nNew-WebBinding -Name \"MyApp\" -Protocol http -Port 80\n\n# Bind an SSL certificate to the HTTPS site\n$cert = Get-ChildItem -Path Cert:\\LocalMachine\\My | Where-Object { $_.Subject -like \"*example.com*\" }\nNew-Item IIS:\\SslBindings\\0.0.0.0!443 -Value $cert\n\n# Create a virtual directory\nNew-WebVirtualDirectory -Site \"MyApp\" -Name \"static\" -PhysicalPath \"C:\\inetpub\\static\"\n\n# Start, stop, and restart a site\nStart-Website -Name \"MyApp\"\nStop-Website  -Name \"MyApp\"\nRestart-WebAppPool -Name \"ProductionPool\"\n\n# List all websites and their state\nGet-Website | Select-Object Name, State, PhysicalPath, @{N='Bindings';E={$_.Bindings.Collection.bindingInformation}}\n\n# Enable IIS logging with W3C format\nSet-WebConfigurationProperty -PSPath \"IIS:\\Sites\\MyApp\" `\n  -Filter \"system.webServer\u002FhttpLogging\" `\n  -Name \"dontLog\" -Value $false\n\n# URL Rewrite: redirect HTTP to HTTPS (requires URL Rewrite module)\n# web.config rule:\n@'\n\u003Crule name=\"HTTP to HTTPS\" stopProcessing=\"true\">\n  \u003Cmatch url=\"(.*)\" \u002F>\n  \u003Cconditions>\n    \u003Cadd input=\"{HTTPS}\" pattern=\"off\" \u002F>\n  \u003C\u002Fconditions>\n  \u003Caction type=\"Redirect\" url=\"https:\u002F\u002F{HTTP_HOST}\u002F{R:1}\" redirectType=\"Permanent\" \u002F>\n\u003C\u002Frule>\n'@\n```\n\n## Active Directory Basics\n\n```powershell\n# Promote server to a new domain controller in a new forest\nInstall-ADDSForest `\n  -DomainName \"corp.example.com\" `\n  -DomainNetBIOSName \"CORP\" `\n  -InstallDns:$true `\n  -SafeModeAdministratorPassword (ConvertTo-SecureString \"P@ssw0rd!\" -AsPlainText -Force) `\n  -Force:$true\n\n# Create an Organizational Unit\nNew-ADOrganizationalUnit -Name \"Engineering\" -Path \"DC=corp,DC=example,DC=com\"\n\n# Create a new AD user\nNew-ADUser -Name \"Jane Smith\" `\n  -SamAccountName \"jsmith\" `\n  -UserPrincipalName \"jsmith@corp.example.com\" `\n  -Path \"OU=Engineering,DC=corp,DC=example,DC=com\" `\n  -AccountPassword (ConvertTo-SecureString \"TempP@ss1\" -AsPlainText -Force) `\n  -Enabled $true `\n  -ChangePasswordAtLogon $true\n\n# Add user to a group\nAdd-ADGroupMember -Identity \"Domain Admins\" -Members \"jsmith\"\n\n# Search for users in an OU\nGet-ADUser -Filter * -SearchBase \"OU=Engineering,DC=corp,DC=example,DC=com\" | Select-Object Name, SamAccountName, Enabled\n\n# Disable a user account\nDisable-ADAccount -Identity \"jsmith\"\n\n# Unlock a locked-out account\nUnlock-ADAccount -Identity \"jsmith\"\n\n# Reset a user password\nSet-ADAccountPassword -Identity \"jsmith\" -Reset -NewPassword (ConvertTo-SecureString \"NewP@ss1\" -AsPlainText -Force)\n\n# List all domain controllers\nGet-ADDomainController -Filter * | Select-Object Name, IPv4Address, Site\n\n# Check AD replication status\nGet-ADReplicationPartnerMetadata -Target \"dc01.corp.example.com\"\nrepadmin \u002Freplsummary\n```\n\n## Windows Update Management\n\n```powershell\n# Install the PSWindowsUpdate module (from PowerShell Gallery)\nInstall-Module -Name PSWindowsUpdate -Force\n\n# Check for available updates\nGet-WindowsUpdate\n\n# Install all available updates (auto-reboot if needed)\nInstall-WindowsUpdate -AcceptAll -AutoReboot\n\n# Install only critical and security updates\nInstall-WindowsUpdate -Category \"Security Updates\",\"Critical Updates\" -AcceptAll\n\n# View update history\nGet-WUHistory | Select-Object -First 20 Title, Date, Result\n\n# Schedule monthly patching via Task Scheduler\n$action  = New-ScheduledTaskAction -Execute \"powershell.exe\" `\n  -Argument \"-NoProfile -Command Install-WindowsUpdate -AcceptAll -AutoReboot\"\n$trigger = New-ScheduledTaskTrigger -Weekly -DaysOfWeek Sunday -At 2am\nRegister-ScheduledTask -TaskName \"MonthlyPatching\" -Action $action -Trigger $trigger -User \"SYSTEM\" -RunLevel Highest\n\n# WSUS configuration via Group Policy (registry keys)\n# HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\WindowsUpdate\n# WUServer = http:\u002F\u002Fwsus.corp.example.com:8530\n# WUStatusServer = http:\u002F\u002Fwsus.corp.example.com:8530\n```\n\n## Event Log Analysis\n\n```powershell\n# View the 50 most recent System log errors\nGet-EventLog -LogName System -EntryType Error -Newest 50\n\n# Search for specific event IDs (e.g., unexpected shutdowns = 6008)\nGet-EventLog -LogName System -InstanceId 6008\n\n# Use Get-WinEvent for advanced filtering (newer cmdlet)\nGet-WinEvent -FilterHashtable @{\n    LogName   = 'Application'\n    Level     = 2   # Error\n    StartTime = (Get-Date).AddDays(-1)\n} | Select-Object TimeCreated, Id, Message -First 20\n\n# Search Security log for failed logons (Event ID 4625)\nGet-WinEvent -FilterHashtable @{\n    LogName = 'Security'\n    Id      = 4625\n} | Select-Object TimeCreated, @{N='Account';E={$_.Properties[5].Value}}, @{N='Source';E={$_.Properties[19].Value}} -First 30\n\n# Export events to CSV for analysis\nGet-WinEvent -FilterHashtable @{ LogName='System'; Level=1,2 } |\n  Export-Csv -Path C:\\Logs\\system-errors.csv -NoTypeInformation\n\n# Clear old event log entries (use cautiously)\nClear-EventLog -LogName Application\n\n# Set maximum log size\nLimit-EventLog -LogName Application -MaximumSize 512MB -OverflowAction OverwriteAsNeeded\n```\n\n## Scheduled Tasks\n\n```powershell\n# Create a scheduled task to run a script daily at 3 AM\n$action  = New-ScheduledTaskAction -Execute \"powershell.exe\" `\n  -Argument \"-NoProfile -File C:\\Scripts\\daily-maintenance.ps1\"\n$trigger = New-ScheduledTaskTrigger -Daily -At 3am\n$settings = New-ScheduledTaskSettingsSet -StartWhenAvailable -DontStopOnIdleEnd\nRegister-ScheduledTask -TaskName \"DailyMaintenance\" -Action $action -Trigger $trigger -Settings $settings -User \"SYSTEM\"\n\n# List all scheduled tasks\nGet-ScheduledTask | Where-Object { $_.State -ne 'Disabled' } | Select-Object TaskName, State, TaskPath\n\n# Run a task immediately\nStart-ScheduledTask -TaskName \"DailyMaintenance\"\n\n# Disable and remove a task\nDisable-ScheduledTask -TaskName \"DailyMaintenance\"\nUnregister-ScheduledTask -TaskName \"DailyMaintenance\" -Confirm:$false\n```\n\n## Troubleshooting\n\n| Symptom | Diagnostic Command | Common Fix |\n|---|---|---|\n| IIS site returns 503 | `Get-WebAppPoolState` | Restart the application pool; check Event Log for crash |\n| High CPU on server | `Get-Process \\| Sort CPU -Desc` | Identify process; check for runaway w3wp or service |\n| Disk running low | `Get-PSDrive -PSProvider FileSystem` | Clear temp files, IIS logs, Windows Update cache |\n| AD account locked out | `Search-ADAccount -LockedOut` | `Unlock-ADAccount`; find lockout source in Security log |\n| Windows Update fails | `Get-WindowsUpdate -Verbose` | Run `sfc \u002Fscannow`, reset update components |\n| Service fails to start | `Get-EventLog -LogName System -Newest 20` | Check dependencies, credentials, and port conflicts |\n| RDP connection refused | `Get-ItemProperty 'HKLM:\\System\\...\\Terminal Server'` | Ensure RDP is enabled and firewall allows port 3389 |\n| DNS resolution fails | `Resolve-DnsName example.com` | Check DNS server settings and forwarder config |\n\n## Related Skills\n\n- `linux-administration` -- Cross-platform comparison and hybrid management\n- `ssh-configuration` -- SSH access for Windows OpenSSH Server\n- `user-management` -- Parallel concepts for Linux user\u002Fgroup management\n- `systemd-services` -- Linux equivalent of Windows Services and Task Scheduler\n- `performance-tuning` -- Performance monitoring and optimization patterns\n\n## Limitations\n\n- Infrastructure commands can disrupt services: confirm target host\u002Fscope and have backups\u002Fsnapshots before mutating state.\n- Docs-only import: upstream scripts and templates not bundled.\n\n",{"name":5,"risk":32,"source":51,"license":14,"category":52,"metadata":53,"date_added":56,"description":7,"source_repo":57,"source_type":37,"compatibility":58,"license_source":59},"https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills","devops",{"author":54,"version":55},"devops-skills","1.0","2026-09-20","BagelHole\u002FDevOps-Security-Agent-Skills","Requires the relevant OS\u002Fplatform tooling and privileged access where noted. Docs-only; helper scripts and templates not bundled.","https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills\u002Fblob\u002Fmain\u002FLICENSE","f3312ba749561b6159f477dbfc9313c875d40a56",".agents\u002Fskills_archive\u002Fwindows-server","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612","2026-10-25 23:50:58",{"source":8,"skillName":5,"commands":66,"prompt":76,"zipAvailable":77},[67,70,73],{"tool":68,"command":69},"npx","npx skills add duc-duy-1612\u002FOnline-Delivery-Systems-Web --skill windows-server",{"tool":71,"command":72},"bunx","bunx skills add duc-duy-1612\u002FOnline-Delivery-Systems-Web --skill windows-server",{"tool":74,"command":75},"pnpm","pnpm dlx skills add duc-duy-1612\u002FOnline-Delivery-Systems-Web --skill windows-server","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fwindows-server\u002FSKILL.md",true,[],[80,100,124,148,174,198],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":89,"publishedAt":46},"01M6Q0FA5FZ410Z33Z3TFQ4DBA","zero-trust","Implement zero-trust network architecture. Configure identity-based access, micro-segmentation, and continuous verification. Use when implementing modern security architectures.","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fzero-trust\u002FSKILL.md",[86],{"categoryNo":87,"categoryName":88,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000011","运维与部署",[90,91,92,93,94,95,82,96,41,40,97,39,37,36,35,32,98,31,30,99],"ZeRO","trust","zero trust","architecture","assessment","verification","segmentation","configure","scope","implementing",{"skillNo":101,"name":102,"nameZh":6,"description":103,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":104,"categories":105,"keywords":106,"publishedAt":46},"01M6Q0F1YZJW3KX5FBKEVZ8CV4","zcode-delegate","Delegate coding tasks to the Z.AI ZCode CLI only when the user explicitly requests it, while the orchestrator retains review and landing responsibility.","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fzcode-delegate\u002FSKILL.md",[],[107,108,109,110,111,112,113,114,115,116,117,118,119,39,120,37,121,122,32,123],"delegate","zcode","zcode delegate","review","cli","orchestration","tasks","run","Bash","model","node","read","orchestrator","files","desktop app","app","agent-orchestration",{"skillNo":125,"name":126,"nameZh":6,"description":127,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":128,"categories":129,"keywords":130,"publishedAt":46},"01M6Q0ETK41VGNMYEXW0T00AJN","youtube-transcript","Fetch YouTube transcripts through DeepAPI or local fallback tooling and save clean text output.","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fyoutube-transcript\u002FSKILL.md",[],[131,132,133,134,135,136,137,43,138,139,140,141,142,37,36,143,144,145,146,147],"transcript","youtube transcript","youtube","safe","github","codex","research","https","text","fetch","tooling","clean","local","output","deepapi","youtube transcripts","blob",{"skillNo":149,"name":150,"nameZh":6,"description":151,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":152,"categories":153,"keywords":163,"publishedAt":46},"01M6Q0EPPH2PVMDW40017F8WX0","youtube-transcript-skills","Fetch YouTube video transcripts, search videos\u002Fchannels, browse channels, and extract playlists via the getyoutubetranscript.com API - free tier, no card required.","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fyoutube-transcript-skills\u002FSKILL.md",[154,155,158],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},{"categoryNo":156,"categoryName":157,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000016","图像与多媒体",{"categoryNo":159,"categoryName":160,"taxonomyType":161,"taxonomyTypeDesc":162},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[131,132,133,164,134,165,135,136,43,166,167,168,169,140,170,37,36,171,172,173],"youtube transcript skills","gemini","search","api","Video","browse","api-integration","free","card","channels",{"skillNo":175,"name":176,"nameZh":6,"description":177,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":178,"categories":179,"keywords":184,"publishedAt":46},"01M6Q0EAB96PX83W5PTE8A0R8D","youtube-notetaker","Turn YouTube talks into local study notes with slides, transcripts, editable annotations, and a markdown-backed viewer.","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fyoutube-notetaker\u002FSKILL.md",[180,183],{"categoryNo":181,"categoryName":182,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000003","演示文稿",{"categoryNo":156,"categoryName":157,"taxonomyType":20,"taxonomyTypeDesc":21},[133,185,186,111,134,187,188,189,190,43,168,191,192,193,194,36,195,143,196,197],"youtube notetaker","notetaker","workflow","official","notes","code","markdown","slides","annotations","README","study","dair-academy","viewer",{"skillNo":199,"name":200,"nameZh":6,"description":201,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":202,"categories":203,"keywords":205,"publishedAt":46},"01M6Q0E55F0GW5MX48V8HXS8B5","youtube-full","Fetch YouTube transcripts, search videos, browse channels, and extract playlists via TranscriptAPI — no yt-dlp, no Google API key, works from any cloud server.","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fyoutube-full\u002FSKILL.md",[204],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},[206,133,207,208,134,165,166,27,209,167,168,169,140,210,170,37,36,171,211,146],"youtube full","full","google","dlp","credits","automatic"]