スキル一覧に戻る
404kidwiz

powershell-51-expert

by 404kidwiz

133 Agent Skills converted from Claude Code subagents to Anthropic Agent Skills format. 100% quality compliance. 12 major domains covered.

0🍴 0📅 2026年1月25日
GitHubで見るManusで実行

SKILL.md


name: powershell-5.1-expert description: Expert in legacy Windows PowerShell 5.1. Specializes in WMI, ADSI, COM automation, and maintaining backward compatibility with Windows Server environments. Use for Windows-specific automation on legacy systems. Triggers include "PowerShell 5.1", "Windows PowerShell", "WMI", "ADSI", "COM object", "legacy PowerShell".

PowerShell 5.1 Expert

Purpose

Provides expertise in Windows PowerShell 5.1 for legacy Windows environments. Specializes in WMI queries, ADSI operations, COM automation, and maintaining scripts compatible with older Windows Server systems.

When to Use

  • Scripting for Windows Server 2012/2016/2019
  • Working with WMI for system management
  • Active Directory operations via ADSI
  • COM automation (Office, legacy apps)
  • Maintaining backward compatibility
  • DSC (Desired State Configuration)
  • Windows-specific automation
  • Legacy script maintenance

Quick Start

Invoke this skill when:

  • Working with Windows PowerShell 5.1 specifically
  • Using WMI for system queries
  • Automating with ADSI or COM objects
  • Maintaining legacy PowerShell scripts
  • DSC configuration management

Do NOT invoke when:

  • Cross-platform PowerShell → use /powershell-7-expert
  • GUI/TUI development → use /powershell-ui-architect
  • Security hardening → use /powershell-security-hardening
  • Module architecture → use /powershell-module-architect

Decision Framework

PowerShell Version Context?
├── Must run on older Windows
│   └── Use 5.1 with WMI/ADSI
├── Cross-platform needed
│   └── Use PowerShell 7+ instead
├── AD Management
│   ├── Simple → ADSI
│   └── Complex → AD Module
└── System Info
    ├── Legacy → WMI
    └── Modern → CIM (also works in 5.1)

Core Workflows

1. WMI System Query

  1. Identify WMI class (Win32_*)
  2. Construct WMI query
  3. Use Get-WmiObject or Get-CimInstance
  4. Filter results appropriately
  5. Format output
  6. Handle errors for remote systems

2. ADSI Operations

  1. Create DirectoryEntry object
  2. Navigate LDAP path
  3. Query or modify attributes
  4. Commit changes if modifying
  5. Handle authentication
  6. Clean up resources

3. COM Automation

  1. Create COM object with New-Object -ComObject
  2. Access object model
  3. Perform operations
  4. Handle COM errors
  5. Release COM objects properly
  6. Clean up with [System.Runtime.InteropServices.Marshal]

Best Practices

  • Use CIM cmdlets over WMI when possible (better remoting)
  • Always include error handling for remote operations
  • Release COM objects explicitly to prevent memory leaks
  • Test on target Windows versions
  • Document required PowerShell modules
  • Use approved verbs for functions

Anti-Patterns

Anti-PatternProblemCorrect Approach
Not releasing COMMemory leaksExplicit cleanup
WMI over slow networksPerformance issuesUse CIM with sessions
No error handlingSilent failuresTry/Catch with logging
Hardcoded pathsPortability issuesUse environment variables
Write-Host for outputCan't captureWrite-Output or return

スコア

総合スコア

60/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

+10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です