opencode-skills-collection 4.0.68 → 4.0.69
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundled-skills/.antigravity-install-manifest.json +266 -1
- package/bundled-skills/access-review/SKILL.md +394 -0
- package/bundled-skills/access-review/references/details.md +121 -0
- package/bundled-skills/agent-evals/SKILL.md +420 -0
- package/bundled-skills/agent-observability/SKILL.md +346 -0
- package/bundled-skills/agent-observability/references/details.md +786 -0
- package/bundled-skills/ai-agent-security/SKILL.md +393 -0
- package/bundled-skills/ai-agent-security/references/details.md +912 -0
- package/bundled-skills/ai-coding-agent-guardrails/SKILL.md +442 -0
- package/bundled-skills/ai-coding-agent-guardrails/references/details.md +753 -0
- package/bundled-skills/ai-inference-service-mesh/SKILL.md +449 -0
- package/bundled-skills/ai-pipeline-orchestration/SKILL.md +287 -0
- package/bundled-skills/ai-red-teaming/SKILL.md +409 -0
- package/bundled-skills/ai-security-hardening/SKILL.md +343 -0
- package/bundled-skills/ai-sre-incident-response/SKILL.md +336 -0
- package/bundled-skills/alerting-oncall/SKILL.md +458 -0
- package/bundled-skills/alerting-oncall/references/details.md +84 -0
- package/bundled-skills/apk-redteam-pipeline/SKILL.md +446 -0
- package/bundled-skills/argocd-gitops/SKILL.md +469 -0
- package/bundled-skills/arm-templates/SKILL.md +438 -0
- package/bundled-skills/arm-templates/references/details.md +64 -0
- package/bundled-skills/asset-inventory/SKILL.md +412 -0
- package/bundled-skills/asset-inventory/references/details.md +127 -0
- package/bundled-skills/audit-logging/SKILL.md +476 -0
- package/bundled-skills/aws-cloudtrail/SKILL.md +486 -0
- package/bundled-skills/aws-cost-optimization/SKILL.md +331 -0
- package/bundled-skills/aws-ec2/SKILL.md +426 -0
- package/bundled-skills/aws-ecs-fargate/SKILL.md +388 -0
- package/bundled-skills/aws-iam/SKILL.md +463 -0
- package/bundled-skills/aws-lambda/SKILL.md +428 -0
- package/bundled-skills/aws-rds/SKILL.md +380 -0
- package/bundled-skills/aws-s3/SKILL.md +434 -0
- package/bundled-skills/aws-secrets-manager/SKILL.md +486 -0
- package/bundled-skills/aws-vpc/SKILL.md +436 -0
- package/bundled-skills/azure-ai-document-intelligence-ts/SKILL.md +1 -1
- package/bundled-skills/azure-aks/SKILL.md +423 -0
- package/bundled-skills/azure-devops/SKILL.md +457 -0
- package/bundled-skills/azure-functions-devsec/SKILL.md +436 -0
- package/bundled-skills/azure-keyvault/SKILL.md +455 -0
- package/bundled-skills/azure-keyvault/references/details.md +83 -0
- package/bundled-skills/azure-monitor-audit/SKILL.md +379 -0
- package/bundled-skills/azure-networking/SKILL.md +448 -0
- package/bundled-skills/azure-networking/references/details.md +135 -0
- package/bundled-skills/azure-sql/SKILL.md +413 -0
- package/bundled-skills/azure-sql/references/details.md +113 -0
- package/bundled-skills/azure-vms/SKILL.md +402 -0
- package/bundled-skills/azure-vms/references/details.md +134 -0
- package/bundled-skills/backup-recovery/SKILL.md +388 -0
- package/bundled-skills/bb-methodology/SKILL.md +451 -0
- package/bundled-skills/bb-methodology/references/details.md +120 -0
- package/bundled-skills/block-storage/SKILL.md +371 -0
- package/bundled-skills/blue-green-deploy/SKILL.md +453 -0
- package/bundled-skills/blue-green-deploy/references/details.md +90 -0
- package/bundled-skills/bug-bounty/SKILL.md +447 -0
- package/bundled-skills/bug-bounty/references/details.md +1316 -0
- package/bundled-skills/bugcrowd-reporting/SKILL.md +351 -0
- package/bundled-skills/business-continuity/SKILL.md +463 -0
- package/bundled-skills/career-ops/SKILL.md +186 -0
- package/bundled-skills/cdn-setup/SKILL.md +374 -0
- package/bundled-skills/change-management/SKILL.md +438 -0
- package/bundled-skills/change-management/references/details.md +105 -0
- package/bundled-skills/circleci/SKILL.md +475 -0
- package/bundled-skills/cis-benchmarks/SKILL.md +150 -0
- package/bundled-skills/cloudflare-pages/SKILL.md +318 -0
- package/bundled-skills/cloudflare-r2/SKILL.md +353 -0
- package/bundled-skills/cloudflare-workers/SKILL.md +415 -0
- package/bundled-skills/cloudflare-zero-trust/SKILL.md +361 -0
- package/bundled-skills/cloudformation/SKILL.md +461 -0
- package/bundled-skills/constraint-driven-development/SKILL.md +335 -0
- package/bundled-skills/constraint-driven-development/references/floor-guard.md +99 -0
- package/bundled-skills/container-hardening/SKILL.md +126 -0
- package/bundled-skills/container-registries/SKILL.md +435 -0
- package/bundled-skills/container-scanning/SKILL.md +416 -0
- package/bundled-skills/convex-backend/SKILL.md +338 -0
- package/bundled-skills/dast-scanning/SKILL.md +437 -0
- package/bundled-skills/database-backups/SKILL.md +425 -0
- package/bundled-skills/datadog/SKILL.md +487 -0
- package/bundled-skills/dependency-scanning/SKILL.md +457 -0
- package/bundled-skills/devcontainers-nix/SKILL.md +416 -0
- package/bundled-skills/disaster-recovery/SKILL.md +374 -0
- package/bundled-skills/disaster-recovery/references/details.md +219 -0
- package/bundled-skills/dns-management/SKILL.md +375 -0
- package/bundled-skills/docker-compose/SKILL.md +482 -0
- package/bundled-skills/docker-management/SKILL.md +426 -0
- package/bundled-skills/ebpf-observability/SKILL.md +436 -0
- package/bundled-skills/ebpf-observability/references/details.md +542 -0
- package/bundled-skills/elk-stack/SKILL.md +487 -0
- package/bundled-skills/enterprise-vpn-attack/SKILL.md +395 -0
- package/bundled-skills/evidence-hygiene/SKILL.md +404 -0
- package/bundled-skills/feature-flags/SKILL.md +426 -0
- package/bundled-skills/feature-flags/references/details.md +86 -0
- package/bundled-skills/fedramp-compliance/SKILL.md +453 -0
- package/bundled-skills/firebase-app-platform/SKILL.md +381 -0
- package/bundled-skills/firewall-config/SKILL.md +479 -0
- package/bundled-skills/gcp-audit-logs/SKILL.md +452 -0
- package/bundled-skills/gcp-audit-logs/references/details.md +56 -0
- package/bundled-skills/gcp-cloud-functions/SKILL.md +284 -0
- package/bundled-skills/gcp-cloud-sql/SKILL.md +277 -0
- package/bundled-skills/gcp-compute/SKILL.md +319 -0
- package/bundled-skills/gcp-gke/SKILL.md +307 -0
- package/bundled-skills/gcp-networking/SKILL.md +293 -0
- package/bundled-skills/gcp-secret-manager/SKILL.md +421 -0
- package/bundled-skills/gcp-secret-manager/references/details.md +131 -0
- package/bundled-skills/gdpr-compliance/SKILL.md +451 -0
- package/bundled-skills/gdpr-compliance/references/details.md +145 -0
- package/bundled-skills/geo-audit/SKILL.md +368 -0
- package/bundled-skills/geo-brand-mentions/SKILL.md +68 -0
- package/bundled-skills/geo-brand-mentions/references/details.md +471 -0
- package/bundled-skills/geo-citability/SKILL.md +350 -0
- package/bundled-skills/geo-compare/SKILL.md +340 -0
- package/bundled-skills/geo-content/SKILL.md +383 -0
- package/bundled-skills/geo-crawlers/SKILL.md +408 -0
- package/bundled-skills/geo-llmstxt/SKILL.md +464 -0
- package/bundled-skills/geo-platform-optimizer/SKILL.md +314 -0
- package/bundled-skills/geo-proposal/SKILL.md +378 -0
- package/bundled-skills/geo-prospect/SKILL.md +225 -0
- package/bundled-skills/geo-report/SKILL.md +436 -0
- package/bundled-skills/geo-report-pdf/SKILL.md +157 -0
- package/bundled-skills/geo-schema/SKILL.md +408 -0
- package/bundled-skills/geo-technical/SKILL.md +78 -0
- package/bundled-skills/geo-technical/references/details.md +543 -0
- package/bundled-skills/git-workflow/SKILL.md +460 -0
- package/bundled-skills/github-actions/SKILL.md +368 -0
- package/bundled-skills/gitlab-ci/SKILL.md +340 -0
- package/bundled-skills/gpu-kubernetes-operations/SKILL.md +468 -0
- package/bundled-skills/gpu-server-management/SKILL.md +236 -0
- package/bundled-skills/hashicorp-vault/SKILL.md +408 -0
- package/bundled-skills/helm-charts/SKILL.md +469 -0
- package/bundled-skills/hipaa-compliance/SKILL.md +451 -0
- package/bundled-skills/hunt-aspnet/SKILL.md +321 -0
- package/bundled-skills/hunt-ato/SKILL.md +184 -0
- package/bundled-skills/hunt-auth-bypass/SKILL.md +426 -0
- package/bundled-skills/hunt-auth-bypass/references/details.md +80 -0
- package/bundled-skills/hunt-brute-force/SKILL.md +341 -0
- package/bundled-skills/hunt-business-logic/SKILL.md +281 -0
- package/bundled-skills/hunt-cache-poison/SKILL.md +382 -0
- package/bundled-skills/hunt-captcha-bypass/SKILL.md +136 -0
- package/bundled-skills/hunt-cicd/SKILL.md +311 -0
- package/bundled-skills/hunt-clickjacking/SKILL.md +110 -0
- package/bundled-skills/hunt-cors/SKILL.md +335 -0
- package/bundled-skills/hunt-dom/SKILL.md +323 -0
- package/bundled-skills/hunt-exceptional-conditions/SKILL.md +111 -0
- package/bundled-skills/hunt-file-upload/SKILL.md +202 -0
- package/bundled-skills/hunt-fintech-graphql/SKILL.md +289 -0
- package/bundled-skills/hunt-forgot-password/SKILL.md +114 -0
- package/bundled-skills/hunt-grpc/SKILL.md +317 -0
- package/bundled-skills/hunt-host-header/SKILL.md +309 -0
- package/bundled-skills/hunt-html-injection/SKILL.md +106 -0
- package/bundled-skills/hunt-http-smuggling/SKILL.md +129 -0
- package/bundled-skills/hunt-http-smuggling/references/phase2h-smuggling-cachepoison.md +177 -0
- package/bundled-skills/hunt-idor/SKILL.md +434 -0
- package/bundled-skills/hunt-jwt-crypto/SKILL.md +221 -0
- package/bundled-skills/hunt-k8s/SKILL.md +337 -0
- package/bundled-skills/hunt-laravel/SKILL.md +255 -0
- package/bundled-skills/hunt-ldap/SKILL.md +351 -0
- package/bundled-skills/hunt-lfi/SKILL.md +311 -0
- package/bundled-skills/hunt-llm-ai/SKILL.md +289 -0
- package/bundled-skills/hunt-mfa-bypass/SKILL.md +177 -0
- package/bundled-skills/hunt-misc/SKILL.md +378 -0
- package/bundled-skills/hunt-nextjs/SKILL.md +299 -0
- package/bundled-skills/hunt-nodejs/SKILL.md +263 -0
- package/bundled-skills/hunt-nosqli/SKILL.md +210 -0
- package/bundled-skills/hunt-ntlm-info/SKILL.md +314 -0
- package/bundled-skills/hunt-oauth/SKILL.md +459 -0
- package/bundled-skills/hunt-open-redirect/SKILL.md +223 -0
- package/bundled-skills/hunt-race-condition/SKILL.md +381 -0
- package/bundled-skills/hunt-race-condition/references/details.md +159 -0
- package/bundled-skills/hunt-rag-vector/SKILL.md +212 -0
- package/bundled-skills/hunt-rce/SKILL.md +444 -0
- package/bundled-skills/hunt-rce/references/details.md +110 -0
- package/bundled-skills/hunt-saml/SKILL.md +156 -0
- package/bundled-skills/hunt-session/SKILL.md +342 -0
- package/bundled-skills/hunt-shadow-api/SKILL.md +198 -0
- package/bundled-skills/hunt-source-leak/SKILL.md +345 -0
- package/bundled-skills/hunt-spa-api/SKILL.md +163 -0
- package/bundled-skills/hunt-springboot/SKILL.md +285 -0
- package/bundled-skills/hunt-sqli/SKILL.md +466 -0
- package/bundled-skills/hunt-ssrf/SKILL.md +396 -0
- package/bundled-skills/hunt-ssrf/references/details.md +179 -0
- package/bundled-skills/hunt-ssti/SKILL.md +163 -0
- package/bundled-skills/hunt-subdomain/SKILL.md +379 -0
- package/bundled-skills/hunt-tls-network/SKILL.md +399 -0
- package/bundled-skills/hunt-xxe/SKILL.md +466 -0
- package/bundled-skills/i-have-adhd/SKILL.md +170 -0
- package/bundled-skills/identity-access-management/SKILL.md +382 -0
- package/bundled-skills/identity-access-management/references/details.md +524 -0
- package/bundled-skills/incident-management/SKILL.md +484 -0
- package/bundled-skills/incident-response/SKILL.md +448 -0
- package/bundled-skills/incident-response/references/details.md +113 -0
- package/bundled-skills/interview-me/SKILL.md +248 -0
- package/bundled-skills/iso27001-compliance/SKILL.md +460 -0
- package/bundled-skills/jenkins/SKILL.md +462 -0
- package/bundled-skills/jev-use/SKILL.md +158 -0
- package/bundled-skills/kubernetes-hardening/SKILL.md +154 -0
- package/bundled-skills/kubernetes-ops/SKILL.md +449 -0
- package/bundled-skills/kubernetes-ops/references/details.md +108 -0
- package/bundled-skills/kustomize/SKILL.md +478 -0
- package/bundled-skills/linux-administration/SKILL.md +367 -0
- package/bundled-skills/linux-hardening/SKILL.md +154 -0
- package/bundled-skills/llm-app-security/SKILL.md +389 -0
- package/bundled-skills/llm-app-security/references/details.md +674 -0
- package/bundled-skills/llm-caching/SKILL.md +334 -0
- package/bundled-skills/llm-cost-optimization/SKILL.md +311 -0
- package/bundled-skills/llm-fine-tuning/SKILL.md +329 -0
- package/bundled-skills/llm-gateway/SKILL.md +282 -0
- package/bundled-skills/llm-inference-scaling/SKILL.md +286 -0
- package/bundled-skills/llmops-platform-engineering/SKILL.md +472 -0
- package/bundled-skills/load-balancing/SKILL.md +403 -0
- package/bundled-skills/loki-logging/SKILL.md +479 -0
- package/bundled-skills/m365-entra-attack/SKILL.md +423 -0
- package/bundled-skills/mac-mini-llm-lab/SKILL.md +350 -0
- package/bundled-skills/mcp-server-security/SKILL.md +356 -0
- package/bundled-skills/mcp-server-security/references/details.md +745 -0
- package/bundled-skills/mdm-device-management/SKILL.md +404 -0
- package/bundled-skills/mdm-device-management/references/details.md +410 -0
- package/bundled-skills/meme-coin-audit/SKILL.md +402 -0
- package/bundled-skills/mid-engagement-ir-detection/SKILL.md +377 -0
- package/bundled-skills/model-registry-governance/SKILL.md +452 -0
- package/bundled-skills/model-serving-kubernetes/SKILL.md +339 -0
- package/bundled-skills/model-supply-chain-security/SKILL.md +427 -0
- package/bundled-skills/mongodb/SKILL.md +436 -0
- package/bundled-skills/multi-tenant-llm-hosting/SKILL.md +435 -0
- package/bundled-skills/multi-tenant-llm-hosting/references/details.md +211 -0
- package/bundled-skills/mysql/SKILL.md +390 -0
- package/bundled-skills/new-relic/SKILL.md +472 -0
- package/bundled-skills/nfs-storage/SKILL.md +356 -0
- package/bundled-skills/object-storage/SKILL.md +378 -0
- package/bundled-skills/offensive-osint/SKILL.md +443 -0
- package/bundled-skills/okta-attack/SKILL.md +436 -0
- package/bundled-skills/ollama-stack/SKILL.md +379 -0
- package/bundled-skills/openclaw-deployment-hardening/SKILL.md +135 -0
- package/bundled-skills/openclaw-local-mac-mini/SKILL.md +426 -0
- package/bundled-skills/openclaw-local-mac-mini/references/details.md +221 -0
- package/bundled-skills/openclaw-security-hardening/SKILL.md +135 -0
- package/bundled-skills/openshift/SKILL.md +485 -0
- package/bundled-skills/opentelemetry/SKILL.md +438 -0
- package/bundled-skills/opentelemetry/references/details.md +78 -0
- package/bundled-skills/opentofu-migration/SKILL.md +349 -0
- package/bundled-skills/osint-methodology/SKILL.md +460 -0
- package/bundled-skills/osint-methodology/references/details.md +1350 -0
- package/bundled-skills/pci-dss-compliance/SKILL.md +446 -0
- package/bundled-skills/penetration-testing/SKILL.md +152 -0
- package/bundled-skills/performance-tuning/SKILL.md +381 -0
- package/bundled-skills/planetscale/SKILL.md +297 -0
- package/bundled-skills/platform-engineering/SKILL.md +348 -0
- package/bundled-skills/platform-engineering/references/details.md +944 -0
- package/bundled-skills/podman/SKILL.md +405 -0
- package/bundled-skills/policy-as-code/SKILL.md +434 -0
- package/bundled-skills/policy-as-code/references/details.md +204 -0
- package/bundled-skills/postgresql-devsec/SKILL.md +378 -0
- package/bundled-skills/prometheus-grafana/SKILL.md +469 -0
- package/bundled-skills/prompt-injection-defense/SKILL.md +483 -0
- package/bundled-skills/rag-infrastructure/SKILL.md +269 -0
- package/bundled-skills/rag-observability-evals/SKILL.md +444 -0
- package/bundled-skills/rag-observability-evals/references/details.md +92 -0
- package/bundled-skills/recon-scope-triage/SKILL.md +128 -0
- package/bundled-skills/redis/SKILL.md +421 -0
- package/bundled-skills/redteam-report-template/SKILL.md +370 -0
- package/bundled-skills/report-writing/SKILL.md +426 -0
- package/bundled-skills/report-writing/references/details.md +187 -0
- package/bundled-skills/reverse-proxy/SKILL.md +420 -0
- package/bundled-skills/runbook-creation/SKILL.md +438 -0
- package/bundled-skills/runbook-creation/references/details.md +71 -0
- package/bundled-skills/saas-security-posture/SKILL.md +415 -0
- package/bundled-skills/sast-scanning/SKILL.md +444 -0
- package/bundled-skills/sbom-supply-chain/SKILL.md +433 -0
- package/bundled-skills/security-arsenal/SKILL.md +446 -0
- package/bundled-skills/security-arsenal/references/details.md +540 -0
- package/bundled-skills/security-automation/SKILL.md +146 -0
- package/bundled-skills/semantic-versioning/SKILL.md +434 -0
- package/bundled-skills/semantic-versioning/references/details.md +83 -0
- package/bundled-skills/service-mesh/SKILL.md +422 -0
- package/bundled-skills/soc2-compliance/SKILL.md +409 -0
- package/bundled-skills/sops-encryption/SKILL.md +124 -0
- package/bundled-skills/sre-dashboards/SKILL.md +143 -0
- package/bundled-skills/ssh-configuration/SKILL.md +324 -0
- package/bundled-skills/ssl-tls-management/SKILL.md +428 -0
- package/bundled-skills/ssl-tls-management/references/details.md +99 -0
- package/bundled-skills/startup-it-troubleshooting/SKILL.md +415 -0
- package/bundled-skills/supply-chain-attack-recon/SKILL.md +453 -0
- package/bundled-skills/supply-chain-attack-recon/references/details.md +258 -0
- package/bundled-skills/systemd-services/SKILL.md +379 -0
- package/bundled-skills/terraform-aws/SKILL.md +125 -0
- package/bundled-skills/terraform-azure/SKILL.md +415 -0
- package/bundled-skills/terraform-azure/references/details.md +231 -0
- package/bundled-skills/terraform-gcp/SKILL.md +369 -0
- package/bundled-skills/threat-modeling/SKILL.md +487 -0
- package/bundled-skills/user-management/SKILL.md +383 -0
- package/bundled-skills/using-agent-skills/SKILL.md +220 -0
- package/bundled-skills/vector-database-ops/SKILL.md +300 -0
- package/bundled-skills/vendor-management/SKILL.md +439 -0
- package/bundled-skills/vendor-management/references/details.md +109 -0
- package/bundled-skills/vercel-deployments/SKILL.md +296 -0
- package/bundled-skills/vllm-server/SKILL.md +236 -0
- package/bundled-skills/vmware-vcenter-attack/SKILL.md +412 -0
- package/bundled-skills/vpn-setup/SKILL.md +452 -0
- package/bundled-skills/vulnerability-scanning/SKILL.md +448 -0
- package/bundled-skills/waf-setup/SKILL.md +354 -0
- package/bundled-skills/waf-setup/references/details.md +211 -0
- package/bundled-skills/web2-recon/SKILL.md +440 -0
- package/bundled-skills/web2-recon/references/details.md +319 -0
- package/bundled-skills/web3-audit/SKILL.md +445 -0
- package/bundled-skills/web3-audit/references/details.md +224 -0
- package/bundled-skills/windows-hardening/SKILL.md +454 -0
- package/bundled-skills/windows-hardening/references/details.md +204 -0
- package/bundled-skills/windows-server/SKILL.md +318 -0
- package/bundled-skills/zero-trust/SKILL.md +461 -0
- package/package.json +1 -1
- package/skills_index.json +6943 -323
|
@@ -0,0 +1,318 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: windows-server
|
|
3
|
+
description: Administer Windows Server systems. Manage IIS, Active Directory, and
|
|
4
|
+
PowerShell automation. Use when administering Windows infrastructure.
|
|
5
|
+
category: devops
|
|
6
|
+
risk: critical
|
|
7
|
+
source: https://github.com/BagelHole/DevOps-Security-Agent-Skills
|
|
8
|
+
source_repo: BagelHole/DevOps-Security-Agent-Skills
|
|
9
|
+
source_type: community
|
|
10
|
+
date_added: '2026-09-20'
|
|
11
|
+
license: MIT
|
|
12
|
+
license_source: https://github.com/BagelHole/DevOps-Security-Agent-Skills/blob/main/LICENSE
|
|
13
|
+
compatibility: Requires the relevant OS/platform tooling and privileged access where
|
|
14
|
+
noted. Docs-only; helper scripts and templates not bundled.
|
|
15
|
+
metadata:
|
|
16
|
+
author: devops-skills
|
|
17
|
+
version: '1.0'
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
# Windows Server Administration
|
|
21
|
+
|
|
22
|
+
Windows Server management and PowerShell automation for production workloads including IIS web hosting, Active Directory domain services, and system maintenance.
|
|
23
|
+
|
|
24
|
+
## When to Use
|
|
25
|
+
|
|
26
|
+
- Provisioning or configuring Windows Server 2019/2022 instances
|
|
27
|
+
- Setting up IIS websites, application pools, and bindings
|
|
28
|
+
- Managing Active Directory users, groups, and Group Policy
|
|
29
|
+
- Automating administrative tasks with PowerShell
|
|
30
|
+
- Reviewing Windows Event Logs for troubleshooting
|
|
31
|
+
- Applying and managing Windows Updates on servers
|
|
32
|
+
|
|
33
|
+
## Prerequisites
|
|
34
|
+
|
|
35
|
+
- Administrator account on the target server
|
|
36
|
+
- PowerShell 5.1+ (built-in) or PowerShell 7+ installed
|
|
37
|
+
- Remote Desktop or WinRM access configured
|
|
38
|
+
- Windows Server 2019 or 2022 (Desktop Experience or Server Core)
|
|
39
|
+
|
|
40
|
+
## PowerShell Administration Essentials
|
|
41
|
+
|
|
42
|
+
```powershell
|
|
43
|
+
# Check PowerShell version
|
|
44
|
+
$PSVersionTable.PSVersion
|
|
45
|
+
|
|
46
|
+
# Get system information
|
|
47
|
+
Get-ComputerInfo | Select-Object CsName, OsName, OsVersion, OsArchitecture
|
|
48
|
+
|
|
49
|
+
# List running processes sorted by CPU
|
|
50
|
+
Get-Process | Sort-Object CPU -Descending | Select-Object -First 20
|
|
51
|
+
|
|
52
|
+
# List all services and their status
|
|
53
|
+
Get-Service | Where-Object { $_.Status -eq 'Running' }
|
|
54
|
+
|
|
55
|
+
# Restart a service
|
|
56
|
+
Restart-Service -Name W3SVC -Force
|
|
57
|
+
|
|
58
|
+
# Get disk space on all drives
|
|
59
|
+
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)}}
|
|
60
|
+
|
|
61
|
+
# Check uptime
|
|
62
|
+
(Get-Date) - (Get-CimInstance Win32_OperatingSystem).LastBootUpTime
|
|
63
|
+
|
|
64
|
+
# Open firewall port
|
|
65
|
+
New-NetFirewallRule -DisplayName "Allow HTTPS" -Direction Inbound -Protocol TCP -LocalPort 443 -Action Allow
|
|
66
|
+
|
|
67
|
+
# List firewall rules
|
|
68
|
+
Get-NetFirewallRule | Where-Object { $_.Enabled -eq 'True' -and $_.Direction -eq 'Inbound' } | Select-Object DisplayName, Action
|
|
69
|
+
|
|
70
|
+
# Set DNS client server addresses
|
|
71
|
+
Set-DnsClientServerAddress -InterfaceAlias "Ethernet" -ServerAddresses ("10.0.0.2","10.0.0.3")
|
|
72
|
+
|
|
73
|
+
# PowerShell remoting to another server
|
|
74
|
+
Enter-PSSession -ComputerName server02 -Credential (Get-Credential)
|
|
75
|
+
|
|
76
|
+
# Run a command on multiple remote servers
|
|
77
|
+
Invoke-Command -ComputerName server01,server02,server03 -ScriptBlock { Get-Service W3SVC }
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Server Roles and Features
|
|
81
|
+
|
|
82
|
+
```powershell
|
|
83
|
+
# List all available roles and features
|
|
84
|
+
Get-WindowsFeature
|
|
85
|
+
|
|
86
|
+
# Install IIS with management tools
|
|
87
|
+
Install-WindowsFeature -Name Web-Server -IncludeManagementTools -IncludeAllSubFeature
|
|
88
|
+
|
|
89
|
+
# Install Active Directory Domain Services
|
|
90
|
+
Install-WindowsFeature -Name AD-Domain-Services -IncludeManagementTools
|
|
91
|
+
|
|
92
|
+
# Install DNS Server
|
|
93
|
+
Install-WindowsFeature -Name DNS -IncludeManagementTools
|
|
94
|
+
|
|
95
|
+
# Install DHCP Server
|
|
96
|
+
Install-WindowsFeature -Name DHCP -IncludeManagementTools
|
|
97
|
+
|
|
98
|
+
# Install File Server with deduplication
|
|
99
|
+
Install-WindowsFeature -Name FS-FileServer, FS-Data-Deduplication
|
|
100
|
+
|
|
101
|
+
# List installed features only
|
|
102
|
+
Get-WindowsFeature | Where-Object Installed | Select-Object Name, InstallState
|
|
103
|
+
|
|
104
|
+
# Remove a feature
|
|
105
|
+
Uninstall-WindowsFeature -Name Telnet-Client
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## IIS Web Server Setup
|
|
109
|
+
|
|
110
|
+
```powershell
|
|
111
|
+
# Import the IIS administration module
|
|
112
|
+
Import-Module WebAdministration
|
|
113
|
+
|
|
114
|
+
# Create a new application pool
|
|
115
|
+
New-WebAppPool -Name "ProductionPool"
|
|
116
|
+
Set-ItemProperty IIS:\AppPools\ProductionPool -Name processModel.identityType -Value 3 # NetworkService
|
|
117
|
+
Set-ItemProperty IIS:\AppPools\ProductionPool -Name managedRuntimeVersion -Value "" # No managed code (reverse proxy)
|
|
118
|
+
|
|
119
|
+
# Create a new website
|
|
120
|
+
New-Website -Name "MyApp" `
|
|
121
|
+
-Port 443 `
|
|
122
|
+
-Protocol https `
|
|
123
|
+
-PhysicalPath "C:\inetpub\myapp" `
|
|
124
|
+
-ApplicationPool "ProductionPool" `
|
|
125
|
+
-SslFlags 1
|
|
126
|
+
|
|
127
|
+
# Add an HTTP binding that redirects to HTTPS
|
|
128
|
+
New-WebBinding -Name "MyApp" -Protocol http -Port 80
|
|
129
|
+
|
|
130
|
+
# Bind an SSL certificate to the HTTPS site
|
|
131
|
+
$cert = Get-ChildItem -Path Cert:\LocalMachine\My | Where-Object { $_.Subject -like "*example.com*" }
|
|
132
|
+
New-Item IIS:\SslBindings\0.0.0.0!443 -Value $cert
|
|
133
|
+
|
|
134
|
+
# Create a virtual directory
|
|
135
|
+
New-WebVirtualDirectory -Site "MyApp" -Name "static" -PhysicalPath "C:\inetpub\static"
|
|
136
|
+
|
|
137
|
+
# Start, stop, and restart a site
|
|
138
|
+
Start-Website -Name "MyApp"
|
|
139
|
+
Stop-Website -Name "MyApp"
|
|
140
|
+
Restart-WebAppPool -Name "ProductionPool"
|
|
141
|
+
|
|
142
|
+
# List all websites and their state
|
|
143
|
+
Get-Website | Select-Object Name, State, PhysicalPath, @{N='Bindings';E={$_.Bindings.Collection.bindingInformation}}
|
|
144
|
+
|
|
145
|
+
# Enable IIS logging with W3C format
|
|
146
|
+
Set-WebConfigurationProperty -PSPath "IIS:\Sites\MyApp" `
|
|
147
|
+
-Filter "system.webServer/httpLogging" `
|
|
148
|
+
-Name "dontLog" -Value $false
|
|
149
|
+
|
|
150
|
+
# URL Rewrite: redirect HTTP to HTTPS (requires URL Rewrite module)
|
|
151
|
+
# web.config rule:
|
|
152
|
+
@'
|
|
153
|
+
<rule name="HTTP to HTTPS" stopProcessing="true">
|
|
154
|
+
<match url="(.*)" />
|
|
155
|
+
<conditions>
|
|
156
|
+
<add input="{HTTPS}" pattern="off" />
|
|
157
|
+
</conditions>
|
|
158
|
+
<action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="Permanent" />
|
|
159
|
+
</rule>
|
|
160
|
+
'@
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
## Active Directory Basics
|
|
164
|
+
|
|
165
|
+
```powershell
|
|
166
|
+
# Promote server to a new domain controller in a new forest
|
|
167
|
+
Install-ADDSForest `
|
|
168
|
+
-DomainName "corp.example.com" `
|
|
169
|
+
-DomainNetBIOSName "CORP" `
|
|
170
|
+
-InstallDns:$true `
|
|
171
|
+
-SafeModeAdministratorPassword (ConvertTo-SecureString "P@ssw0rd!" -AsPlainText -Force) `
|
|
172
|
+
-Force:$true
|
|
173
|
+
|
|
174
|
+
# Create an Organizational Unit
|
|
175
|
+
New-ADOrganizationalUnit -Name "Engineering" -Path "DC=corp,DC=example,DC=com"
|
|
176
|
+
|
|
177
|
+
# Create a new AD user
|
|
178
|
+
New-ADUser -Name "Jane Smith" `
|
|
179
|
+
-SamAccountName "jsmith" `
|
|
180
|
+
-UserPrincipalName "jsmith@corp.example.com" `
|
|
181
|
+
-Path "OU=Engineering,DC=corp,DC=example,DC=com" `
|
|
182
|
+
-AccountPassword (ConvertTo-SecureString "TempP@ss1" -AsPlainText -Force) `
|
|
183
|
+
-Enabled $true `
|
|
184
|
+
-ChangePasswordAtLogon $true
|
|
185
|
+
|
|
186
|
+
# Add user to a group
|
|
187
|
+
Add-ADGroupMember -Identity "Domain Admins" -Members "jsmith"
|
|
188
|
+
|
|
189
|
+
# Search for users in an OU
|
|
190
|
+
Get-ADUser -Filter * -SearchBase "OU=Engineering,DC=corp,DC=example,DC=com" | Select-Object Name, SamAccountName, Enabled
|
|
191
|
+
|
|
192
|
+
# Disable a user account
|
|
193
|
+
Disable-ADAccount -Identity "jsmith"
|
|
194
|
+
|
|
195
|
+
# Unlock a locked-out account
|
|
196
|
+
Unlock-ADAccount -Identity "jsmith"
|
|
197
|
+
|
|
198
|
+
# Reset a user password
|
|
199
|
+
Set-ADAccountPassword -Identity "jsmith" -Reset -NewPassword (ConvertTo-SecureString "NewP@ss1" -AsPlainText -Force)
|
|
200
|
+
|
|
201
|
+
# List all domain controllers
|
|
202
|
+
Get-ADDomainController -Filter * | Select-Object Name, IPv4Address, Site
|
|
203
|
+
|
|
204
|
+
# Check AD replication status
|
|
205
|
+
Get-ADReplicationPartnerMetadata -Target "dc01.corp.example.com"
|
|
206
|
+
repadmin /replsummary
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
## Windows Update Management
|
|
210
|
+
|
|
211
|
+
```powershell
|
|
212
|
+
# Install the PSWindowsUpdate module (from PowerShell Gallery)
|
|
213
|
+
Install-Module -Name PSWindowsUpdate -Force
|
|
214
|
+
|
|
215
|
+
# Check for available updates
|
|
216
|
+
Get-WindowsUpdate
|
|
217
|
+
|
|
218
|
+
# Install all available updates (auto-reboot if needed)
|
|
219
|
+
Install-WindowsUpdate -AcceptAll -AutoReboot
|
|
220
|
+
|
|
221
|
+
# Install only critical and security updates
|
|
222
|
+
Install-WindowsUpdate -Category "Security Updates","Critical Updates" -AcceptAll
|
|
223
|
+
|
|
224
|
+
# View update history
|
|
225
|
+
Get-WUHistory | Select-Object -First 20 Title, Date, Result
|
|
226
|
+
|
|
227
|
+
# Schedule monthly patching via Task Scheduler
|
|
228
|
+
$action = New-ScheduledTaskAction -Execute "powershell.exe" `
|
|
229
|
+
-Argument "-NoProfile -Command Install-WindowsUpdate -AcceptAll -AutoReboot"
|
|
230
|
+
$trigger = New-ScheduledTaskTrigger -Weekly -DaysOfWeek Sunday -At 2am
|
|
231
|
+
Register-ScheduledTask -TaskName "MonthlyPatching" -Action $action -Trigger $trigger -User "SYSTEM" -RunLevel Highest
|
|
232
|
+
|
|
233
|
+
# WSUS configuration via Group Policy (registry keys)
|
|
234
|
+
# HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate
|
|
235
|
+
# WUServer = http://wsus.corp.example.com:8530
|
|
236
|
+
# WUStatusServer = http://wsus.corp.example.com:8530
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
## Event Log Analysis
|
|
240
|
+
|
|
241
|
+
```powershell
|
|
242
|
+
# View the 50 most recent System log errors
|
|
243
|
+
Get-EventLog -LogName System -EntryType Error -Newest 50
|
|
244
|
+
|
|
245
|
+
# Search for specific event IDs (e.g., unexpected shutdowns = 6008)
|
|
246
|
+
Get-EventLog -LogName System -InstanceId 6008
|
|
247
|
+
|
|
248
|
+
# Use Get-WinEvent for advanced filtering (newer cmdlet)
|
|
249
|
+
Get-WinEvent -FilterHashtable @{
|
|
250
|
+
LogName = 'Application'
|
|
251
|
+
Level = 2 # Error
|
|
252
|
+
StartTime = (Get-Date).AddDays(-1)
|
|
253
|
+
} | Select-Object TimeCreated, Id, Message -First 20
|
|
254
|
+
|
|
255
|
+
# Search Security log for failed logons (Event ID 4625)
|
|
256
|
+
Get-WinEvent -FilterHashtable @{
|
|
257
|
+
LogName = 'Security'
|
|
258
|
+
Id = 4625
|
|
259
|
+
} | Select-Object TimeCreated, @{N='Account';E={$_.Properties[5].Value}}, @{N='Source';E={$_.Properties[19].Value}} -First 30
|
|
260
|
+
|
|
261
|
+
# Export events to CSV for analysis
|
|
262
|
+
Get-WinEvent -FilterHashtable @{ LogName='System'; Level=1,2 } |
|
|
263
|
+
Export-Csv -Path C:\Logs\system-errors.csv -NoTypeInformation
|
|
264
|
+
|
|
265
|
+
# Clear old event log entries (use cautiously)
|
|
266
|
+
Clear-EventLog -LogName Application
|
|
267
|
+
|
|
268
|
+
# Set maximum log size
|
|
269
|
+
Limit-EventLog -LogName Application -MaximumSize 512MB -OverflowAction OverwriteAsNeeded
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
## Scheduled Tasks
|
|
273
|
+
|
|
274
|
+
```powershell
|
|
275
|
+
# Create a scheduled task to run a script daily at 3 AM
|
|
276
|
+
$action = New-ScheduledTaskAction -Execute "powershell.exe" `
|
|
277
|
+
-Argument "-NoProfile -File C:\Scripts\daily-maintenance.ps1"
|
|
278
|
+
$trigger = New-ScheduledTaskTrigger -Daily -At 3am
|
|
279
|
+
$settings = New-ScheduledTaskSettingsSet -StartWhenAvailable -DontStopOnIdleEnd
|
|
280
|
+
Register-ScheduledTask -TaskName "DailyMaintenance" -Action $action -Trigger $trigger -Settings $settings -User "SYSTEM"
|
|
281
|
+
|
|
282
|
+
# List all scheduled tasks
|
|
283
|
+
Get-ScheduledTask | Where-Object { $_.State -ne 'Disabled' } | Select-Object TaskName, State, TaskPath
|
|
284
|
+
|
|
285
|
+
# Run a task immediately
|
|
286
|
+
Start-ScheduledTask -TaskName "DailyMaintenance"
|
|
287
|
+
|
|
288
|
+
# Disable and remove a task
|
|
289
|
+
Disable-ScheduledTask -TaskName "DailyMaintenance"
|
|
290
|
+
Unregister-ScheduledTask -TaskName "DailyMaintenance" -Confirm:$false
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
## Troubleshooting
|
|
294
|
+
|
|
295
|
+
| Symptom | Diagnostic Command | Common Fix |
|
|
296
|
+
|---|---|---|
|
|
297
|
+
| IIS site returns 503 | `Get-WebAppPoolState` | Restart the application pool; check Event Log for crash |
|
|
298
|
+
| High CPU on server | `Get-Process \| Sort CPU -Desc` | Identify process; check for runaway w3wp or service |
|
|
299
|
+
| Disk running low | `Get-PSDrive -PSProvider FileSystem` | Clear temp files, IIS logs, Windows Update cache |
|
|
300
|
+
| AD account locked out | `Search-ADAccount -LockedOut` | `Unlock-ADAccount`; find lockout source in Security log |
|
|
301
|
+
| Windows Update fails | `Get-WindowsUpdate -Verbose` | Run `sfc /scannow`, reset update components |
|
|
302
|
+
| Service fails to start | `Get-EventLog -LogName System -Newest 20` | Check dependencies, credentials, and port conflicts |
|
|
303
|
+
| RDP connection refused | `Get-ItemProperty 'HKLM:\System\...\Terminal Server'` | Ensure RDP is enabled and firewall allows port 3389 |
|
|
304
|
+
| DNS resolution fails | `Resolve-DnsName example.com` | Check DNS server settings and forwarder config |
|
|
305
|
+
|
|
306
|
+
## Related Skills
|
|
307
|
+
|
|
308
|
+
- `linux-administration` -- Cross-platform comparison and hybrid management
|
|
309
|
+
- `ssh-configuration` -- SSH access for Windows OpenSSH Server
|
|
310
|
+
- `user-management` -- Parallel concepts for Linux user/group management
|
|
311
|
+
- `systemd-services` -- Linux equivalent of Windows Services and Task Scheduler
|
|
312
|
+
- `performance-tuning` -- Performance monitoring and optimization patterns
|
|
313
|
+
|
|
314
|
+
## Limitations
|
|
315
|
+
|
|
316
|
+
- Infrastructure commands can disrupt services: confirm target host/scope and have backups/snapshots before mutating state.
|
|
317
|
+
- Docs-only import: upstream scripts and templates not bundled.
|
|
318
|
+
|