跳到正文
Skillpedia
API 与服务器(后端)48k · #6188

windows-server

它能做什么

这个代理可以帮你管理 Windows 服务器。它能搭建网站、管理网络中的用户和计算机,还能通过脚本自动完成任务。

适用场景

  • ✓在 Windows 服务器上搭建新网站。
  • ✓在公司网络中添加或移除某个组的用户。
  • ✓自动化重复性的服务器管理工作。

技能链接

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/windows-server/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/windows-server/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“在服务器上新建一个名为 'my-site' 的网站,路径为 C:\my-site,端口为 80。”

每周 5 个新技能,1 分钟读完。

工作原理

你把命令交给代理,代理会在 Windows 服务器上执行。它会使用 PowerShell 等工具来完成你要求的操作。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Windows Server Administration

Windows Server management and PowerShell automation for production workloads including IIS web hosting, Active Directory domain services, and system maintenance.

When to Use

  • Provisioning or configuring Windows Server 2019/2022 instances
  • Setting up IIS websites, application pools, and bindings
  • Managing Active Directory users, groups, and Group Policy
  • Automating administrative tasks with PowerShell
  • Reviewing Windows Event Logs for troubleshooting
  • Applying and managing Windows Updates on servers

Prerequisites

  • Administrator account on the target server
  • PowerShell 5.1+ (built-in) or PowerShell 7+ installed
  • Remote Desktop or WinRM access configured
  • Windows Server 2019 or 2022 (Desktop Experience or Server Core)

PowerShell Administration Essentials

# Check PowerShell version
$PSVersionTable.PSVersion

# Get system information
Get-ComputerInfo | Select-Object CsName, OsName, OsVersion, OsArchitecture

# List running processes sorted by CPU
Get-Process | Sort-Object CPU -Descending | Select-Object -First 20

# List all services and their status
Get-Service | Where-Object { $_.Status -eq 'Running' }

# Restart a service
Restart-Service -Name W3SVC -Force

# Get disk space on all drives
Get-PSDrive -PSProvider FileSystem | Select-Object Name, @{N='Used(GB)';E={[math]::Round($_.Used/1GB,2)}}, @{N='Free(GB)';E={[math]::Round($_.Free/1GB,2)}}

# Check uptime
(Get-Date) - (Get-CimInstance Win32_OperatingSystem).LastBootUpTime

# Open firewall port
New-NetFirewallRule -DisplayName "Allow HTTPS" -Direction Inbound -Protocol TCP -LocalPort 443 -Action Allow

# List firewall rules
Get-NetFirewallRule | Where-Object { $_.Enabled -eq 'True' -and $_.Direction -eq 'Inbound' } | Select-Object DisplayName, Action

# Set DNS client server addresses
Set-DnsClientServerAddress -InterfaceAlias "Ethernet" -ServerAddresses ("10.0.0.2","10.0.0.3")

# PowerShell remoting to another server
Enter-PSSession -ComputerName server02 -Credential (Get-Credential)

# Run a command on multiple remote servers
Invoke-Command -ComputerName server01,server02,server03 -ScriptBlock { Get-Service W3SVC }

Server Roles and Features

# List all available roles and features
Get-WindowsFeature

# Install IIS with management tools
Install-WindowsFeature -Name Web-Server -IncludeManagementTools -IncludeAllSubFeature

# Install Active Directory Domain Services
Install-WindowsFeature -Name AD-Domain-Services -IncludeManagementTools

# Install DNS Server
Install-WindowsFeature -Name DNS -IncludeManagementTools

# Install DHCP Server
Install-WindowsFeature -Name DHCP -IncludeManagementTools

# Install File Server with deduplication
Install-WindowsFeature -Name FS-FileServer, FS-Data-Deduplication

# List installed features only
Get-WindowsFeature | Where-Object Installed | Select-Object Name, InstallState

# Remove a feature
Uninstall-WindowsFeature -Name Telnet-Client

IIS Web Server Setup

# Import the IIS administration module
Import-Module WebAdministration

# Create a new application pool
New-WebAppPool -Name "ProductionPool"
Set-ItemProperty IIS:\AppPools\ProductionPool -Name processModel.identityType -Value 3  # NetworkService
Set-ItemProperty IIS:\AppPools\ProductionPool -Name managedRuntimeVersion -Value ""     # No managed code (reverse proxy)

# Create a new website
New-Website -Name "MyApp" `
  -Port 443 `
  -Protocol https `
  -PhysicalPath "C:\inetpub\myapp" `
  -ApplicationPool "ProductionPool" `
  -SslFlags 1

# Add an HTTP binding that redirects to HTTPS
New-WebBinding -Name "MyApp" -Protocol http -Port 80

# Bind an SSL certificate to the HTTPS site
$cert = Get-ChildItem -Path Cert:\LocalMachine\My | Where-Object { $_.Subject -like "*example.com*" }
New-Item IIS:\SslBindings\0.0.0.0!443 -Value $cert

# Create a virtual directory
New-WebVirtualDirectory -Site "MyApp" -Name "static" -PhysicalPath "C:\inetpub\static"

# Start, stop, and restart a site
Start-Website -Name "MyApp"
Stop-Website  -Name "MyApp"
Restart-WebAppPool -Name "ProductionPool"

# List all websites and their state
Get-Website | Select-Object Name, State, PhysicalPath, @{N='Bindings';E={$_.Bindings.Collection.bindingInformation}}

# Enable IIS logging with W3C format
Set-WebConfigurationProperty -PSPath "IIS:\Sites\MyApp" `
  -Filter "system.webServer/httpLogging" `
  -Name "dontLog" -Value $false

# URL Rewrite: redirect HTTP to HTTPS (requires URL Rewrite module)

…
常见问题

我需要特殊的服务器访问权限吗?

需要。代理要对服务器做出修改,你必须拥有 Windows 服务器的管理员权限。

什么是 PowerShell?

PowerShell 是一种命令行工具兼脚本语言,用于管理 Windows 系统。

什么是 Active Directory?

Active Directory 是一种服务,用于管理企业网络中的用户、计算机和权限。

详情

作者的原始描述

Administer Windows Server systems. Manage IIS, Active Directory, and PowerShell automation. Use when administering Windows infrastructure.

repo: sickn33/agentic-awesome-skills

热度

GitHub 星标
48k
排名
#6188
许可证
MIT
更新时间
2026/10/15

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能