Logo Powershell Expert

Powershell Expert

Cộng đồng
hmohamed01
powershell-expert

Develop PowerShell scripts, tools, modules, and GUIs following Microsoft best practices. Use when writing PowerShell code, creating Windows Forms/WPF interfaces, working with PowerShell Gallery modules, or needing cmdlet/module recommendations. Covers script development, parameter design, pipeline handling, error management, and GUI creation patterns. Verifies module availability and cmdlet syntax against live documentation when accuracy is critical.

Tổng quan

Nhà phát hànhhmohamed01
Kho mãpowershell-expert
Tên kỹ năngpowershell-expert
Sao
58
Bản fork
14
Tệp đi kèm
5
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI là Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 5 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được hmohamed01 công bố trên GitHub. Hãy đọc nội dung nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Powershell Expert trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL thư mục kỹ năng bên dưới và xác nhận.
    https://github.com/hmohamed01/powershell-expert/tree/main/powershell-expert
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/hmohamed01/powershell-expert.git /tmp/powershell-expert
mkdir -p .claude/skills
cp -r /tmp/powershell-expert/powershell-expert .claude/skills/powershell-expert
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Powershell Expert trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự tải Powershell Expert ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên Powershell Expert không bị giới hạn ở mô hình mà kỹ năng này được viết cho. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên kỹ năng chưa dùng không tốn chi phí.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

PowerShell Expert

Develop production-quality PowerShell scripts, tools, and GUIs using Microsoft best practices and the PowerShell ecosystem.

Quick Reference

Script Structure

powershell
#Requires -Version 5.1

<#
.SYNOPSIS
    Brief description.
.DESCRIPTION
    Detailed description.
.PARAMETER Name
    Parameter description.
.EXAMPLE
    Example-Usage -Name 'Value'
#>

[CmdletBinding()]
param(
    [Parameter(Mandatory, ValueFromPipeline)]
    [ValidateNotNullOrEmpty()]
    [string[]]$Name,

    [switch]$Force
)

begin {
    # One-time setup
}

process {
    foreach ($item in $Name) {
        # Per-item processing
    }
}

end {
    # Cleanup
}

Function Template

powershell
function Verb-Noun {
    [CmdletBinding(SupportsShouldProcess)]
    param(
        [Parameter(Mandatory, Position = 0)]
        [string]$Name,

        [Parameter(ValueFromPipelineByPropertyName)]
        [Alias('CN')]
        [string]$ComputerName = $env:COMPUTERNAME,

        [switch]$PassThru
    )

    process {
        if ($PSCmdlet.ShouldProcess($Name, 'Action')) {
            # Implementation
            if ($PassThru) { Write-Output $result }
        }
    }
}

Workflow

1. Script Development

Follow naming and parameter conventions:

  • Verb-Noun format with approved verbs (Get-Verb)
  • Strong typing with validation attributes
  • Pipeline support via ValueFromPipeline
  • -WhatIf/-Confirm for destructive operations

See best-practices.md for complete guidelines.

2. GUI Development

Windows Forms for simple dialogs, WPF/XAML for complex interfaces:

powershell
Add-Type -AssemblyName System.Windows.Forms
Add-Type -AssemblyName System.Drawing

$form = New-Object System.Windows.Forms.Form -Property @{
    Text          = 'Title'
    Size          = New-Object System.Drawing.Size(400, 300)
    StartPosition = 'CenterScreen'
}

See gui-development.md for controls, events, and templates.

3. PowerShell Gallery Integration

Search and install modules using PSResourceGet:

powershell
# Search gallery
Find-PSResource -Name 'ModuleName' -Repository PSGallery

# Install module
Install-PSResource -Name 'ModuleName' -Scope CurrentUser -TrustRepository

Use scripts/Search-Gallery.ps1 for enhanced search.

See powershellget.md for full cmdlet reference.

Key Patterns

Error Handling

powershell
try {
    $result = Get-Content -Path $Path -ErrorAction Stop
}
catch [System.IO.FileNotFoundException] {
    Write-Error "File not found: $Path"
    return
}
catch {
    throw
}

Splatting for Readability

powershell
$params = @{
    Path        = $sourcePath
    Destination = $destPath
    Recurse     = $true
    Force       = $true
}
Copy-Item @params

Pipeline Best Practices

powershell
# Stream output immediately
foreach ($item in $collection) {
    Process-Item $item | Write-Output
}

# Accept pipeline input
param(
    [Parameter(ValueFromPipeline)]
    [string[]]$InputObject
)
process {
    foreach ($obj in $InputObject) {
        # Process each
    }
}

Module Recommendations

When recommending modules, search the PowerShell Gallery. These are common starting points — always verify via Module Verification before recommending:

CategoryPopular Modules
AzureAz, Az.Compute, Az.Storage
TestingPester, PSScriptAnalyzer
ConsolePSReadLine, Terminal-Icons
SecretsMicrosoft.PowerShell.SecretManagement
WebPode (web server), PoshRSJob (async)
GUIWPFBot3000, PSGUI

Documentation Lookup

Verify cmdlet syntax and module availability against live sources rather than recalled detail. Every learn.microsoft.com PowerShell page is generated from markdown in a public MicrosoftDocs repository — fetch the markdown, not the rendered page. The source is far smaller, carries no navigation chrome or JavaScript, and preserves syntax blocks and parameter tables verbatim.

Raw Markdown Sources (WebFetch)

Use the WebFetch tool against raw.githubusercontent.com. Construct the URL directly from the templates below — do not search for it first.

Command kindURL template
Core PowerShellGet-ChildItem, Write-Output, Invoke-Commandhttps://raw.githubusercontent.com/MicrosoftDocs/PowerShell-Docs/main/reference/{version}/{Module}/{Cmdlet}.md
Conceptualabout_Splatting, about_CommonParametershttps://raw.githubusercontent.com/MicrosoftDocs/PowerShell-Docs/main/reference/{version}/Microsoft.PowerShell.Core/About/{about_Topic}.md
Windows-onlyGet-ADUser, Get-DnsServerZone, Get-MpComputerStatushttps://raw.githubusercontent.com/MicrosoftDocs/windows-powershell-docs/main/docset/winserver2025-ps/{Module}/{Cmdlet}.md
Gallery / packagingInstall-PSResource, Find-PSResourcehttps://raw.githubusercontent.com/MicrosoftDocs/powershell-docs-psget/main/powershell-gallery/powershellget-3.x/Microsoft.PowerShell.PSResourceGet/{Cmdlet}.md
Satellite modulesInvoke-ScriptAnalyzer, Get-Secrethttps://raw.githubusercontent.com/MicrosoftDocs/PowerShell-Docs-Modules/main/reference/ps-modules/{Module}/{Cmdlet}.md

{version} is one of 5.1, 7.4, 7.5, 7.6, 7.7. Pin it from context — #Requires, pwsh, ISE, or a stated platform. With no signal, fetch both 7.5 and 5.1 and state any parameter difference, since the wrong edition yields syntax that looks authentic but fails on the user's shell.

WebFetch prompt: Extract the complete syntax blocks, the full parameter table with types and defaults, and the examples.

Three rules govern URL construction:

  1. Case matters. Raw paths are case-sensitive where learn.microsoft.com is not. .../activedirectory/Get-ADUser.md returns 404; .../ActiveDirectory/Get-ADUser.md returns 200. Preserve the module's own casing.
  2. Never point at a folder. Raw serves blobs only — any URL ending in / returns 404. There is no directory-listing endpoint.
  3. Convert page URLs. Rewrite github.com/{owner}/{repo}/blob/{branch}/{path} to raw.githubusercontent.com/{owner}/{repo}/{branch}/{path}.

Routing a cmdlet to the right repository, module, and version folder is covered in doc-sources.md, along with complete module inventories and a 404 troubleshooting table. Consult it whenever the correct path is not obvious.

Fallback Chain

Escalate only on failure, one step at a time:

StepToolUse when
1WebFetch raw markdownDefault — always attempt first
2WebFetch contents APIhttps://api.github.com/repos/{owner}/{repo}/contents/{path}A folder name is unknown. Returns plain JSON that parses cleanly; 60 requests/hour unauthenticated
3WebFetch learn.microsoft.comNo raw source exists (third-party modules, Learn-only articles)
4WebSearchPath cannot be derived. Query: {Cmdlet-Name} site:learn.microsoft.com/en-us/powershell — then convert the result back to a raw URL and return to step 1
5Local executionTools unavailable. Ask the user to run Get-Help {Cmdlet} -Full or Get-Command {Cmdlet} -Syntax

If every step fails, state the uncertainty explicitly rather than guessing:

"I wasn't able to verify this against live documentation. Please confirm by running: Get-Command Cmdlet-Name -Syntax"

Module Verification

Gallery packages have no markdown source. WebFetch the listing page directly:

  • URL: https://www.powershellgallery.com/packages/{ModuleName}
  • Prompt: Extract: module name, latest version, last updated date, total downloads, and whether it shows any deprecation warning or 'unlisted' status

A 404 means the module likely does not exist — confirm with WebSearch for {ModuleName} PowerShell module site:powershellgallery.com. If both tools are unavailable, execute scripts/Search-Gallery.ps1 -Name 'ModuleName'.

ScenarioRequirement
User asks whether module X existsMUST verify on the Gallery
Recommending a specific moduleMUST verify it exists and is not deprecated
Stating a module version requirementMUST check the Gallery for the current version
Providing exact cmdlet syntaxSHOULD verify against raw markdown
General best practicesStatic references suffice

Good (verified against live data):

"ImportExcel (v7.8.10, updated Oct 2024, 17M+ downloads) provides Export-Excel for creating spreadsheets without Excel installed."

Bad (unverified):

"Use the Excel-Tools module to export data." ← may not exist

Rendered Documentation

Browse these manually; prefer the raw sources above when fetching.

Reference Files

TopicFile
Documentation routing, raw URL maps, 404 troubleshootingreferences/doc-sources.md
Naming, parameters, pipeline, error handling, code stylereferences/best-practices.md
Windows Forms, WPF, controls, events, templatesreferences/gui-development.md
Find, install, update, publish modulesreferences/powershellget.md

Included Scripts

ScriptPurpose
scripts/Search-Gallery.ps1Formatted PowerShell Gallery search with legacy Find-Module fallback

Tệp đi kèm

Mô hình đọc các tệp này khi cần trong lúc kỹ năng được tải. Các tệp được cung cấp ở dạng có thể đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Powershell Expert làm được gì?

Develop PowerShell scripts, tools, modules, and GUIs following Microsoft best practices. Use when writing PowerShell code, creating Windows Forms/WPF interfaces, working with PowerShell Gallery modules, or needing cmdlet/module recommendations. Covers script development, parameter design, pipeline handling, error management, and GUI creation patterns. Verifies module availability and cmdlet syntax against live documentation when accuracy is critical.

Vì sao nên dùng Powershell Expert trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Powershell Expert là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Powershell Expert trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/hmohamed01/powershell-expert/tree/main/powershell-expert. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm và cài đặt thành một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Powershell Expert?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Bạn có thể dùng Powershell Expert với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Powershell Expert với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Powershell Expert có miễn phí không?

Kỹ năng này được hmohamed01 phát hành trên GitHub. Hãy xem điều khoản giấy phép trong kho mã. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp cho mô hình các công cụ mới để gọi — mã được chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và tiêu chí của đầu ra tốt. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇