WYRE-AI/msp-claude-plugins/msp-claude-plugins/connectwise/automate/skills/scripts/SKILL.md
ConnectWise Automate Scripts
ConnectWise Automate script management: script types (PowerShell, batch, VBScript, Shell), script folders, script execution on computers, parameter handling and validation, execution status polling, and result/history retrieval.
- Source repository stars
- 42
- Declared platforms
- 0
- Static risk flags
- 1
- Last source update
- 2026-08-28
- Source checked
- 2026-08-28
Decision brief
What it does: where it fits
ConnectWise Automate script management: script types (PowerShell, batch, VBScript, Shell), script folders, script execution on computers, parameter handling and validation, execution status polling, and result/history retrieval.
Not for
- Tasks that require unconfirmed production actions or broad system permissions.
- Environments where the pinned source and install steps cannot be inspected.
Compatibility matrix
Platform support, with evidence labels
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
Inspect first. Install second.
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/WYRE-AI/msp-claude-plugins --skill "msp-claude-plugins/connectwise/automate/skills/scripts"Inspect the Agent Skill "ConnectWise Automate Scripts" from https://github.com/WYRE-AI/msp-claude-plugins/blob/5005f73ba2f52cd299f58aa6bb79f4e70ae87103/msp-claude-plugins/connectwise/automate/skills/scripts/SKILL.md at commit 5005f73ba2f52cd299f58aa6bb79f4e70ae87103. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
What the source asks the agent to do
- 01
Anti-triggers
Shell commands in this session — "run the script" here means
Shell commands in this session — "run the script" here meansWhat fires a script automatically — the threshold or condition thatWhich machines to target — resolving hostnames, checking online - 02
Key Concepts
Review the “Key Concepts” section in the pinned source before continuing.
Review and apply the “Key Concepts” source section. - 03
Script Types
Review the “Script Types” section in the pinned source before continuing.
Review and apply the “Script Types” source section. - 04
Script Execution Modes
Review the “Script Execution Modes” section in the pinned source before continuing.
Review and apply the “Script Execution Modes” source section. - 05
Script Status
Review the “Script Status” section in the pinned source before continuing.
Review and apply the “Script Status” source section.
Permission review
Static risk signals and limitations
Runs scripts
The documentation asks the agent to run terminal commands or scripts.
**Shell commands in this session** — "run the script" here meansRuns scripts
The documentation asks the agent to run terminal commands or scripts.
### Execute Script and Wait for CompletionEvidence record
Why each signal appears
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 91/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 42 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Provenance and original SKILL.md
- Repository
- WYRE-AI/msp-claude-plugins
- Skill path
- msp-claude-plugins/connectwise/automate/skills/scripts/SKILL.md
- Commit
- 5005f73ba2f52cd299f58aa6bb79f4e70ae87103
- License
- Apache-2.0
- Collected
- 2026-08-28
- Default branch
- main
View the original SKILL.md
ConnectWise Automate Script Management
Overview
Scripts in ConnectWise Automate are automation routines that run on managed endpoints. They can be PowerShell, batch files, VBScript, or Automate's native scripting language. This skill covers script listing, execution, parameters, and result retrieval.
Anti-triggers
- Shell commands in this session — "run the script" here means dispatching a stored Automate script to a customer's managed endpoint, never executing anything on the local machine.
- What fires a script automatically — the threshold or condition that
triggers it is a monitor definition; use
connectwise-automate-monitors. - Which machines to target — resolving hostnames, checking online
status and building the target list is
connectwise-automate-computers. - Another RMM's job runner — Datto RMM quickjobs and NinjaOne script
runs share this vocabulary; use
datto-rmm-jobs.
Key Concepts
Script Types
| Type | Extension | Use Case |
|---|---|---|
| Automate Script | Internal | Built-in functions, agent commands |
| PowerShell | .ps1 | Windows automation, complex logic |
| Batch | .bat/.cmd | Simple Windows tasks |
| VBScript | .vbs | Legacy Windows automation |
| Shell | .sh | Linux/macOS automation |
Script Execution Modes
| Mode | Description | Use Case |
|---|---|---|
| Immediate | Run now on target | Ad-hoc tasks |
| Scheduled | Run at specific time | Maintenance |
| On Event | Triggered by alert/monitor | Automated remediation |
| Login/Logout | Run at user session events | User setup |
Script Status
| Status | Description |
|---|---|
Running | Currently executing |
Completed | Finished successfully |
Failed | Execution error |
Pending | Queued for execution |
Timeout | Exceeded time limit |
Cancelled | Manually stopped |
Field Reference
See references/fields.md for the complete Script, ScriptParameter, and ScriptExecution field reference (TypeScript interfaces).
API Patterns
See references/api.md for the complete endpoint catalog: listing/searching scripts, executing on one or many computers, polling execution status, and retrieving execution history — with full request/response JSON examples.
Workflows
Find Script by Name
async function findScriptByName(client, name) {
const scripts = await client.request(
`/Scripts?condition=Name contains '${name}'&pageSize=50`
);
if (scripts.length === 0) {
return { found: false, suggestions: [] };
}
if (scripts.length === 1) {
return { found: true, script: scripts[0] };
}
return {
found: false,
ambiguous: true,
suggestions: scripts.map(s => ({
name: s.Name,
id: s.ScriptID,
folder: s.FolderPath,
description: s.Description
}))
};
}
Execute Script and Wait for Completion
async function runScriptAndWait(client, computerId, scriptId, params = {}, options = {}) {
const { timeoutMs = 300000, pollIntervalMs = 5000 } = options;
// Start the script
const execution = await client.request(
`/Computers/${computerId}/Scripts/${scriptId}/Execute`,
{
method: 'POST',
body: JSON.stringify({ Parameters: params })
}
);
const startTime = Date.now();
// Poll for completion
while (true) {
const status = await client.request(
`/Scripts/Executions/${execution.ExecutionID}`
);
if (['Completed', 'Failed', 'Timeout', 'Cancelled'].includes(status.Status)) {
return {
success: status.Status === 'Completed' && status.ExitCode === 0,
execution: status
};
}
// Check timeout
if (Date.now() - startTime > timeoutMs) {
return {
success: false,
execution: status,
error: 'Polling timeout exceeded'
};
}
await sleep(pollIntervalMs);
}
}
Validate Script Parameters
async function validateScriptParams(client, scriptId, providedParams) {
const script = await client.request(`/Scripts/${scriptId}`);
const errors = [];
const warnings = [];
for (const param of script.Parameters || []) {
const value = providedParams[param.Name];
// Check required parameters
if (param.Required && !value && !param.DefaultValue) {
errors.push(`Missing required parameter: ${param.Name}`);
continue;
}
// Type validation
if (value) {
switch (param.Type) {
case 'Number':
if (isNaN(Number(value))) {
errors.push(`Parameter ${param.Name} must be a number`);
}
break;
case 'Boolean':
if (!['true', 'false', '1', '0'].includes(value.toLowerCase())) {
errors.push(`Parameter ${param.Name} must be true/false`);
}
break;
case 'Dropdown':
if (param.Options && !param.Options.includes(value)) {
errors.push(`Parameter ${param.Name} must be one of: ${param.Options.join(', ')}`);
}
break;
}
}
}
// Check for unknown parameters
const knownParams = new Set((script.Parameters || []).map(p => p.Name));
for (const provided of Object.keys(providedParams)) {
if (!knownParams.has(provided)) {
warnings.push(`Unknown parameter: ${provided}`);
}
}
return {
valid: errors.length === 0,
errors,
warnings
};
}
Batch Script Execution
async function runScriptOnMultipleComputers(client, scriptId, computerIds, params = {}) {
const batchSize = 50;
const allResults = [];
for (let i = 0; i < computerIds.length; i += batchSize) {
const batch = computerIds.slice(i, i + batchSize);
const response = await client.request(`/Scripts/${scriptId}/Execute`, {
method: 'POST',
body: JSON.stringify({
ComputerIDs: batch,
Parameters: params
})
});
allResults.push(...response.Executions);
// Respect rate limits between batches
if (i + batchSize < computerIds.length) {
await sleep(1000);
}
}
return allResults;
}
Monitor Multiple Executions
async function monitorExecutions(client, executionIds, options = {}) {
const { onUpdate, timeoutMs = 600000, pollIntervalMs = 10000 } = options;
const startTime = Date.now();
const results = new Map();
// Initialize tracking
executionIds.forEach(id => results.set(id, { Status: 'Unknown' }));
while (true) {
let allComplete = true;
for (const executionId of executionIds) {
const current = results.get(executionId);
if (['Completed', 'Failed', 'Timeout', 'Cancelled'].includes(current.Status)) {
continue;
}
try {
const execution = await client.request(
`/Scripts/Executions/${executionId}`
);
results.set(executionId, execution);
if (!['Completed', 'Failed', 'Timeout', 'Cancelled'].includes(execution.Status)) {
allComplete = false;
}
if (onUpdate) {
onUpdate(executionId, execution);
}
} catch (error) {
results.set(executionId, { Status: 'Error', error: error.message });
}
}
if (allComplete) break;
if (Date.now() - startTime > timeoutMs) {
break;
}
await sleep(pollIntervalMs);
}
return Array.from(results.entries()).map(([id, data]) => ({
executionId: id,
...data
}));
}
Script Result Summary
function summarizeScriptResult(execution) {
return {
executionId: execution.ExecutionID,
script: execution.ScriptName,
computer: execution.ComputerName,
status: execution.Status,
exitCode: execution.ExitCode,
duration: `${execution.Duration}s`,
success: execution.Status === 'Completed' && execution.ExitCode === 0,
output: execution.Output?.substring(0, 1000) || '',
errors: execution.ErrorOutput?.substring(0, 500) || ''
};
}
Error Handling
Common Script API Errors
| Error | Status | Cause | Resolution |
|---|---|---|---|
| Script not found | 404 | Invalid ScriptID | Verify script exists |
| Computer offline | 400 | Target is offline | Wait for computer or schedule |
| Missing parameter | 400 | Required param not provided | Include all required params |
| Permission denied | 403 | No access to script | Check user permissions |
| Execution failed | 400 | Script error | Check script logs |
Error Response Example
{
"error": {
"code": "BadRequest",
"message": "Cannot execute script on offline computer"
}
}
See references/examples.md for a "Safe Script Execution" wrapper (online check + parameter validation + execute) and a PowerShell script template.
Best Practices
- Verify computer online - Check status before immediate execution
- Validate parameters - Check required and type before running
- Document parameters - Add descriptions to all parameters
- Handle timeouts - Set appropriate execution timeouts
- Log important output - Capture key results in script output
- Use folders - Organize scripts in logical folder structure
- Version scripts - Track changes in script content
- Handle exit codes - Return meaningful exit codes
Script Exit Code Interpretation
| Exit Code | Typical Meaning |
|---|---|
| 0 | Success |
| 1 | General error |
| 2 | Misuse of command |
| 3 | File not found |
| 5 | Access denied |
| 87 | Invalid parameter |
| 1603 | Installation failed |
| -1 | Script exception |
Related Skills
- ConnectWise Automate Computers - Target computers for scripts
- ConnectWise Automate Alerts - Alert-triggered scripts
- ConnectWise Automate Monitors - Monitor-triggered scripts
- ConnectWise Automate API Patterns - Authentication and pagination
Frequently asked questions
What to verify before installation and use
What does the ConnectWise Automate Scripts source document cover?
ConnectWise Automate script management: script types (PowerShell, batch, VBScript, Shell), script folders, script execution on computers, parameter handling and validation, execution status polling, and result/history retrieval.
How do I install ConnectWise Automate Scripts?
The source record exposes this install command: npx skills add https://github.com/WYRE-AI/msp-claude-plugins --skill "msp-claude-plugins/connectwise/automate/skills/scripts". Inspect the command and pinned source before running it.
Which permission-related actions were detected?
Static rules flagged exec-script in the source; the page lists the matching lines and excerpts.
Alternatives
Compare before choosing
garrytan/gbrain
bulk-ingestion
End-to-end discipline for turning any large data source (audio libraries, email takeouts, document corpora, chat exports, API dumps) into brain pages at scale. The lifecycle spine: SCHEMA → ACCESS → TRIAL → EVALUATE → IMPROVE → CODIFY → TEST → SKILLIFY → BULK → MONITOR. State is tracked in a durable JSON manifest (see MANIFEST-PATTERN.md) so any crash, session boundary, or subagent fan-out resumes from ground truth instead of memory.
alirezarezvani/claude-skills
app-store-optimization
App Store Optimization (ASO) toolkit for researching keywords, analyzing competitor rankings, generating metadata suggestions, and improving app visibility on Apple App Store and Google Play Store. Use when the user asks about ASO, app store rankings, app metadata, app titles and descriptions, app store listings, app visibility, or mobile app marketing on iOS or Android. Supports keyword research and scoring, competitor keyword analysis, metadata optimization, A/B test planning, launch checklist
dotnet/skills
migrate-vstest-to-mtp
Migrates .NET test projects from VSTest to Microsoft.Testing.Platform (MTP). Use when user asks to "migrate to MTP", "switch from VSTest", "enable Microsoft.Testing.Platform", "use MTP runner", set OutputType=Exe only for test projects in Directory.Build.props, or mentions EnableMSTestRunner, EnableNUnitRunner, or UseMicrosoftTestingPlatformRunner. USE FOR: MTP behavioral differences vs VSTest (exit code 8, zero tests discovered, --ignore-exit-code, TESTINGPLATFORM_EXITCODE_IGNORE); centralizing
oaustegard/claude-skills
featuring
Generate hierarchical _FEATURES.md files that describe what a codebase DOES from a user/consumer perspective, anchored to source symbols via tree-sitting. Supports large complex codebases through feature-driven decomposition into sub-feature files. Uses a multi-pass synthesis: orientation → detail → overview rewrite. Use when someone says "what does this do", "document features", "feature inventory", "_FEATURES.md", or needs to understand a codebase's purpose before modifying it. Complements tre