- Products
- Learn
- Local User Groups
- Partners
- More
Step Into the Future of
AI-Powered Cyber Security
When the Agents Attack
A Live Look at Agentic Exposure Validation
Bridge the CAASM Gap
with Exposure Management
AI Security Masters E8:
Claude Mythos: New Era in Cyber Security
CheckMates Go:
CheckMates Fest
Hey,
Is there a way to get the dynamic/static routes from VSX virtual systems (VS/VR) using the Run-Script API command?
Meaning, build a script body composed of several CLI commands, such as:
vsenv <vsid>
show route
Thanks in advance.
Try building a one-liner like this:
sh -c 'command 1;command 2;third "command with quotes";fourth \'command with ticks\';command 5'
I haven't used this construct with Run-Script before, but I use it with xargs all the time.
Thanks Bob.
My problem is that I've to run that commands in CLISH mode.
Is there a way to change the CLI mode using run-script API command?
For example: >>clish;set virtual-system 4;show route;
I've also tried: clish -c 'set virtual-system 4;show route;' with no success - run-script failed
Yeah, that's a limitation of clish. It's pretty solidly useless for troubleshooting or most automation. The best workaround I've found so far would be something like this:
sh -c 'printf "set virtual-system 4\nshow route\nexit\n" | clish'
That way, you can wrap the pipeline, do other commands to process the data locally on the firewall, then you get the eventual result back at the management.
There is also now the GAiA API which might be able to do what you want without involving clish.
Probably this won't be perfect for you because you mention of use clish only. But in case you have an expert level access, then you can use following:
for i in /proc/vrf/*; do i=${i#*vrf/}; vsenv $i; echo "set virtual-system" $i > /tmp/clishcmd; echo "show route" >> /tmp/clishcmd; clish -i -f /tmp/clishcmd; done
Just change show route for any other command which you need.
Thank you Petr,
I've tried that in expert mode but it didn't work correctly.
It requires CLISH mode to respond with the correct results (for the combination of "set virtual-system ID" and "show route").
can't you create shell script and then add custom clish command?
Usage: add command <command name> path <command path> description <command description>
we use those for "special" users that can execute only one command in clish that's script based
essentially you map clish command to a shell script
Hey, I cannot, it's customer's device and we are not allowed to upload bash scripts there.
Hi Kaspars,
I could not find a specific thread for this query, but this is the closest I think.
I've created a bunch of VS's using vsx_provisioning_tool on R82, however things I could not do are adding comments, changing the colour of the object and setting the main ip (need to change it).
So I looked at mgmt_cli api commands and I still can't see anything, so was wondering if this can be done using API?
Failing that I would need to go into every object and update (not a biggy but wanted to get it done using a script).
Legacy VSX objects do not have API support.
VSnext (from R82), on the other hand, does.
Thanks. So In my case will just need to update additional parameter manually.
Leaderboard
Epsum factorial non deposit quid pro quo hic escorol.
Wed 10 Jun 2026 @ 01:00 PM (EDT)
Deep Dive: When the Agents Attack: A Live Look at Agentic Exposure ValidationThu 11 Jun 2026 @ 11:00 AM (EDT)
Tips and Tricks 2026 #8: Say Yes to AI Without Saying Yes to RiskFri 12 Jun 2026 @ 10:00 AM (CEST)
CheckMates Live Netherlands - Sessie 47: Continuous Threat Exposure ManagementTue 16 Jun 2026 @ 05:00 PM (CEST)
Under the Hood: Check Point SASE | Internet Access Optimization & Performance TuningWed 10 Jun 2026 @ 01:00 PM (EDT)
Deep Dive: When the Agents Attack: A Live Look at Agentic Exposure ValidationThu 11 Jun 2026 @ 11:00 AM (EDT)
Tips and Tricks 2026 #8: Say Yes to AI Without Saying Yes to RiskFri 12 Jun 2026 @ 10:00 AM (CEST)
CheckMates Live Netherlands - Sessie 47: Continuous Threat Exposure ManagementTue 16 Jun 2026 @ 05:00 PM (CEST)
Under the Hood: Check Point SASE | Internet Access Optimization & Performance TuningThu 18 Jun 2026 @ 10:00 AM (CEST)
The Cloud Architects Series: Check Point WAF - The Next Generation of AI powered protectionAbout CheckMates
Learn Check Point
Advanced Learning
YOU DESERVE THE BEST SECURITY