- Products
- Learn
- Local User Groups
- Partners
- More
MVP 2026: Submissions
Are Now Open!
What's New in R82.10?
Watch NowOverlap in Security Validation
Help us to understand your needs better
CheckMates Go:
Maestro Madness
Hi,
It is possible to run a script from repository using mgmt_cli ?
My need is only run "read command" on gateways using run-script command.
I was thinking that put these read commands into script repository and allow my script user to run script from repository.
(i don't want my script user to run a cpstop command )
I was not able to find any informations about that.
Thanks
As far as I know, you cannot, but you can use run_script command with the commands you want to run:
Hello, i see that it have passed few years since this post was created, but it seems i have a similar problem.
I am trying to run a repository(managed in SC) script through mgmt_api to one of my target gateways. The contents of the script is simply "clish -c 'show configuration'". While i run it from SC - all is great, i see the expected "sho config" output. But from mgmt_api this same request:
```
mgmt_cli run-script script-name "Show Configuration" script-type "repository" targets "gateway_object_name"
```
returns a b64 messageResponse, that when decoded shows something like:
```
APP PID STAT #START START_TIME MON COMMAND
FWK_FORKER 10547 E 1 [15:40:26] 12/10/2023 N fwk_forker
FWK_WD 10556 E 1 [15:40:27] 12/10/2023 N fwk_wd -i 6 -i6 0
CPVIEWD 10702 E 1 [15:40:45] 12/10/2023 N cpviewd
CPVIEWS 10707 E 1 [15:40:45] 12/10/2023 N cpview_services
SXL_STATD 10710 E 1 [15:40:45] 12/10/2023 N sxl_statd
...
...
```
Also this is shown in brief in description of task-details:
```
statusDescription: "APP PID STAT #START START_TIME MON COMMAND , FWK_FORKER 10547 E 1 [15:40:26] 12/10/2023 N fwk_forker , FWK_WD 10556 E 1 [15:40:27] 12/10/2023 N fwk_wd -i 6 -i6 0 , CPVIEWD 10702..."
```
It seems like my request is not even trying to get to specified gateway (changing from name to uid gives nothing)
Can you please point me to what I am doing wrong and how I can get a normal b64 response with "show config" output encoded there?
BTW The goal i try to reach is to get config(and not only) of each gate through web_api of SMS. Mgmt_api is just for low level tshoot, because trouble is the same.
Thank you!
Try to run by "uid", not "script-name".
Yeah, i solved this problem ny running with uid. Forgot to mention here.)
Hey,
You can use the command "mgmt_cli run-script script-name <name> script <scriptname> targets.1 <target_machine_name> ... --format json"
"..." equals more options that are possible to be referenced, like e.g. comments.
You can pick up more information here. If you want to execute scripts from the repository you should be able to do that by just specifying the path to the script within the <scriptname> parameter. Of course here the destination should be the SMS itself, as the repo is located locally there.
Edit: Seems like Valeri was faster than me, nvm.
lol
Leaderboard
Epsum factorial non deposit quid pro quo hic escorol.
| User | Count |
|---|---|
| 19 | |
| 16 | |
| 7 | |
| 5 | |
| 5 | |
| 5 | |
| 4 | |
| 4 | |
| 4 | |
| 4 |
Tue 16 Dec 2025 @ 05:00 PM (CET)
Under the Hood: CloudGuard Network Security for Oracle Cloud - Config and Autoscaling!Thu 18 Dec 2025 @ 10:00 AM (CET)
Cloud Architect Series - Building a Hybrid Mesh Security Strategy across cloudsTue 16 Dec 2025 @ 05:00 PM (CET)
Under the Hood: CloudGuard Network Security for Oracle Cloud - Config and Autoscaling!Thu 18 Dec 2025 @ 10:00 AM (CET)
Cloud Architect Series - Building a Hybrid Mesh Security Strategy across cloudsAbout CheckMates
Learn Check Point
Advanced Learning
YOU DESERVE THE BEST SECURITY