| name | CmPwSh |
| description | Up-to-date Microsoft Configuration Manager PowerShell knowledge for AI agents. Search MECM/SCCM cmdlets, syntax, parameters, and examples locally with no network calls. |
| license | MIT |
| metadata | {"author":"jorgeasaurus","version":"0.1.0"} |
CmPwSh Agent Skill
Search and use Microsoft Configuration Manager PowerShell cmdlets from the bundled MECM index. This mirrors the Microsoft Graph skill workflow: search locally first, inspect syntax and examples, then optionally execute a guarded command in a prepared Config Manager PowerShell session.
What's Included
| Index | What it contains |
|---|
| Cmdlet manifest | Cmdlet names, verbs, categories, site roles |
| Cmdlet docs | Syntax, examples, parameters |
| Example search | Examples extracted from the bundled docs |
How to Run
Run commands through the launcher script in this skill directory:
- macOS/Linux:
bash <path-to-this-skill>/scripts/run.sh <command> [args...]
- Windows:
powershell <path-to-this-skill>/scripts/run.ps1 <command> [args...]
In examples below, cmpwsh means the full launcher invocation.
Finding the Right Cmdlet
Use this order:
- Your own knowledge for obvious cmdlets such as
Get-CMDevice.
sample-search for real examples.
cmdlet-docs-search for syntax, parameters, and examples.
cmdlet-search for broad discovery by query, verb, category, or site role.
category-list when you need the exact category name.
references/REFERENCE.md for common session setup.
cmdlet-search
cmpwsh cmdlet-search --query "device collection"
cmpwsh cmdlet-search --verb Get --category "Collections"
cmpwsh cmdlet-search --query Get-CMDevice --exact
Flags: --query, --verb, --category, --site-role, --exact, --limit, --output json.
cmdlet-docs-search
cmpwsh cmdlet-docs-search --cmdlet Get-CMDevice
cmpwsh cmdlet-docs-search --query "deployment deadline"
cmpwsh cmdlet-docs-search --parameter CollectionName --category Deployment
Flags: --cmdlet, --query, --parameter, --category, --limit, --output json.
sample-search
cmpwsh sample-search --query "application deployment"
cmpwsh sample-search --cmdlet Start-CMApplicationDeployment
Flags: --query, --cmdlet, --category, --limit, --output json.
category-list
cmpwsh category-list
Using with MCP Servers
This folder includes .mcp.json for a bundled stdio MCP server.
Available MCP tools:
| Tool | Purpose |
|---|
search_cmpwsh_cmdlets | Search cmdlets by query, verb, category, or site role |
get_cmpwsh_cmdlet | Get exact syntax, examples, and parameters |
search_cmpwsh_examples | Search examples |
list_cmpwsh_categories | List categories with cmdlet counts |
If an agent has another Config Manager MCP server, use this skill as the local knowledge layer: find the cmdlet, required parameters, and examples here, then execute through that server.
Direct Config Manager PowerShell Execution
Direct execution requires PowerShell and the ConfigurationManager module from the MECM admin console.
cmpwsh env status
cmpwsh cm-call "Get-CMDevice -Name 'PC-001'" --site-code XYZ --provider-server cm01.contoso.com
Environment variables:
| Variable | Description |
|---|
CMPWSH_INDEX_PATH | Override bundled MECM index data path |
CMPWSH_MODULE_PATH | Full path to ConfigurationManager.psd1 |
CMPWSH_SITE_CODE | Config Manager site code |
CMPWSH_PROVIDER_SERVER | SMS Provider server |
Critical Rules
- Never guess Config Manager cmdlet syntax. Verify with
cmdlet-docs-search.
- Use examples before composing write operations.
- Run
env status before cm-call.
- Ask the user before write-capable cmdlets, then use
--allow-writes.
Remove-* and Uninstall-* are blocked.
cm-call accepts one Config Manager pipeline only. Separators, redirection, multiline commands, and unsupported pipeline helpers are blocked.
Compatibility
Search tools run offline on macOS, Linux, and Windows. Direct execution is intended for Windows hosts with the MECM admin console or ConfigurationManager module installed.