MeshCentral icon indicating copy to clipboard operation
MeshCentral copied to clipboard

add args to PreconfiguredScripts

Open Eris92 opened this issue 2 months ago • 1 comments

Is your feature request related to a problem? Please describe. Currently, PreconfiguredScripts allows passing arguments (args) only when the "cmd" property is used. However, when "type": "file" is specified, MeshCentral executes the script file directly from the server’s meshcentral-data/scripts folder — but it ignores any defined "args".

Describe the solution you'd like Extend the PreconfiguredScripts handler to support an optional "args" property for "file" entries. When present, MeshCentral should append the argument string to the command line when executing the script.

Example desired behavior:

{ "name": "Run menu with parameter", "type": "ps1", "runas": "agent", "file": "scripts/menu.ps1", "args": "-Tool diskmgmt" }

Describe alternatives you've considered Would enable parameterized execution of server-side PowerShell scripts for all connected agents.

Additional context This small enhancement would make predefined administrative tools in MeshCentral far more reusable.

Eris92 avatar Oct 09 '25 09:10 Eris92

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Dec 09 '25 03:12 github-actions[bot]

This issue has been automatically closed due to inactivity. If you believe this is still relevant, please feel free to reopen it.

github-actions[bot] avatar Dec 16 '25 03:12 github-actions[bot]