156-215.80 · Question #310
Using mgmt_cli, what is the correct syntax to import a host object called Server_1 from the CLI?
The correct answer is A. mgmt_cli add-host "Server_1" ip_address "10.15.123.10" --format txt. The mgmt_cli command uses 'add-host' with the object name and ip_address parameter to create host objects from the CLI, with '--format txt' specifying the output format.
Question
Using mgmt_cli, what is the correct syntax to import a host object called Server_1 from the CLI?
Options
- Amgmt_cli add-host "Server_1" ip_address "10.15.123.10" --format txt
- Bmgmt_cli add host name "Server_1" ip_address "10.15.123.10" --format json
- Cmgmt_cli add object-host "Server_1" ip_address "10.15.123.10" --format json
- Dmgmt_cli add object "Server_1" ip_address "10.15.123.10" --format json
How the community answered
(27 responses)- A81% (22)
- B4% (1)
- C4% (1)
- D11% (3)
Why each option
The mgmt_cli command uses 'add-host' with the object name and ip_address parameter to create host objects from the CLI, with '--format txt' specifying the output format.
Option A correctly uses the mgmt_cli 'add-host' command followed by the host name and ip_address parameter with '--format txt', which reflects the proper Check Point management CLI syntax for adding a host object. This format produces readable text output confirming the object was created successfully.
While 'add host name' attempts the correct action, the syntax structure and use of '--format json' does not match the correct mgmt_cli invocation format expected for this host object creation operation.
'add object-host' is not a valid mgmt_cli command - Check Point's CLI does not use compound 'object-host' type identifiers for host object creation.
'add object' is not a valid mgmt_cli command type for creating host objects - the correct type identifier must specify 'host' directly, not a generic 'object' keyword.
Concept tested: Check Point mgmt_cli host object creation syntax
Source: https://sc1.checkpoint.com/documents/latest/APIs/index.html
Topics
Community Discussion
No community discussion yet for this question.