- Products
- Learn
- Local User Groups
- Partners
- More
Check Point Jump-Start Online Training
Now Available on CheckMates for Beginners!
Welcome to Maestro Masters!
Talk to Masters, Engage with Masters, Be a Maestro Master!
ZTNA Buyer’s Guide
Zero Trust essentials for your most valuable assets
The SMB Cyber Master
Boost your knowledge on Quantum Spark SMB gateways!
Check Point's Cyber Park is Now Open
Let the Games Begin!
As YOU DESERVE THE BEST SECURITY
Upgrade to our latest GA Jumbo
CheckFlix!
All Videos In One Space
I have a few hundred host objects that I need to rename. The hosts are called site2_xxx_xxx but need to be site3_xxx_xxx. What would be the best way of doing this? I am assuming the API is an option given I am on 80.10.
Thanks
Jon
Hey,
Just add the necessary information to a csv file, set up the csv like this:
name, new-name
site2_xxx_xxx, site3_xxx_xxx
site2_xxx_yyy site3_xxx_yyy
site2_xxx_zzz, site3_xxx_zzz
and so on...
(Use quotation marks if the object names contain spaces)
Afterwards place the csv file on your SMS (or the management PC, which is used to access the SMS via the SmartConsole) and execute either
mgmt_cli set-host -b ./path/to/the/csv/file => locally on the SMS
or
mgmt_cli.exe -m <ip_of_SMS> set-host -b ./path/to/the/csv/file => from the client which has the SmartConsole installed, the mgmt_cli.exe can be found within the SmartConsole install directory. You can open it via cmd or PowerShell.
And that's basically it. If your SMS isn't the best regarding the hw itself (under 4GB of RAM) you will need to activate the API server first. This can be done via the SmartConsole itself or the cli ~ "api start". If you have 4GB+ of RAM it should be automatically enabled.
More information regarding the mentioned api command can be picked up here.
Hope that helps you
Regards,
Maik
Thanks for that - I will give it a try.
Jon
I would test using the show-hosts API command to find and filter out all hosts with the name site2_xxx_xxx . Then I would run the edit-host API command and update each host in that list with it's new name site3_xxx_xxx. There is no need to build a CSV or similar with this approach if you just want to replace "site2" with "site3".
Well of course you can use show-hosts in order to search for specific strings in the name and therefore build a list for the second command.
It's 'set-host' and not 'edit-host' to change a existing host object. The csv is used to change a bigger amount of hosts (which is the reason for this thread) instead of writing the command x times, where each one is used to change one object. The csv approach saves some work and gives a better overall overview.
so is there something I'm missing I tried the csv example but when I ran it I got the following error
code: "generic_err_invalid_parameter_name"
message: "Unrecognized parameter [site3]"
I tried playing around with the csv format comma, no comma; space , no space; quotes, no quotes;, etc..... but always get pretty much the same error
About CheckMates
Learn Check Point
Advanced Learning
YOU DESERVE THE BEST SECURITY