Actions63
- Account Actions
- Auto-Scale Profile Actions
- Backup Actions
- Cost Estimator Actions
- Desktop Image Actions
- Group Actions
- Host Actions
- Host Pool Actions
- Job Actions
- Network Actions
- Recovery Vault Actions
- Reservation Actions
- Resource Group Actions
- Schedule Actions
- Scripted Action Actions
- Secure Variable Actions
- Storage Actions
- Test Actions
- User Actions
- User Session Actions
Scripted Action → Create
AI-generatedSummary
Creates a new account-scoped or MSP-level PowerShell script action.
Inputs
- scope — Whether to operate on account-level (default) or MSP-level (global) scripted actions.
- accountId (required) — The account to operate on (required when scope is 'account'). Choose from the list or specify an ID.
- name (required) — The name of the scripted action.
- script (required) — The PowerShell script to execute.
- additionalFields — Optional fields including description, execution mode (Combined/Individual), and tags.
Output shape
A single record containing the created scripted action data, potentially including a completed job object if polling is enabled.
Depending on the API response, the output includes the action details and may include a job object that was polled for completion if the 'Wait for Completion' parameter is set.
Examples
Example 1: Create an account-level scripted action with a description.
Scope: Account, Name: 'Backup Script', Script: 'Backup-VM...', Additional Fields: Description set.
Example 2: Create a global MSP-level scripted action.
Scope: MSP, Name: 'Global Patching', Script: 'Invoke-Patch...'