cancel
Showing results for 
Search instead for 
Did you mean: 
Create a Post

It is possible to run a script from repository using mgmt_cli ?

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

0 Kudos
3 Replies

Re: It is possible to run a script from repository using mgmt_cli ?

As far as I know, you cannot, but you can use run_script command with the commands you want to run:

Check Point - Management API reference 

0 Kudos
Highlighted
Maik
Silver

Re: It is possible to run a script from repository using mgmt_cli ?

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.

0 Kudos

Re: It is possible to run a script from repository using mgmt_cli ?

lol

0 Kudos