generate_script_from_template
Create PowerShell scripts from predefined templates by providing parameter values. Generate automation scripts for system management, monitoring, and enterprise tasks without manual coding.
Instructions
Generate a PowerShell script from a template.
Args:
template_name: Name of the template to use (without .ps1 extension)
parameters: Dictionary of parameters to replace in the template
output_path: Where to save the generated script (optional)
timeout: Command timeout in seconds (1-300, default 60)
Returns:
Generated script content or path where script was saved
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| template_name | Yes | ||
| parameters | Yes | ||
| output_path | No | ||
| timeout | No |
Input Schema (JSON Schema)
{
"properties": {
"output_path": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Output Path"
},
"parameters": {
"additionalProperties": true,
"title": "Parameters",
"type": "object"
},
"template_name": {
"title": "Template Name",
"type": "string"
},
"timeout": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": 60,
"title": "Timeout"
}
},
"required": [
"template_name",
"parameters"
],
"type": "object"
}