<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic mgmt_cli  -- message: &amp;quot;Unrecognized parameter [ip-address] in General Topics</title>
    <link>https://community.checkpoint.com/t5/General-Topics/mgmt-cli-message-quot-Unrecognized-parameter-ip-address/m-p/176996#M29458</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I'm trying to use 'mgmt_cli' to add multiple hosts to our management server (81.10). I'm following the format in the 'Management API Reference'. I've created a .csv file and tried to import using --batch:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Expert@mgmt:0]# mgmt_cli add host --batch cli_mgmt_test.csv:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;At first this failed with the following error&lt;/P&gt;&lt;P&gt;---------------------------------------------START&lt;BR /&gt;Time: [22:34:12] 1/4/2023&lt;BR /&gt;---------------------------------------------&lt;BR /&gt;"Publish operation" failed (100%)&lt;BR /&gt;Publish failed, the following error has occurred:&lt;BR /&gt;tasks:&lt;BR /&gt;- task-id: "01234567-89ab-cdef-bfad-4320b3d28dca"&lt;BR /&gt;task-name: "Publish operation"&lt;BR /&gt;status: "failed"&lt;BR /&gt;progress-percentage: 100&lt;BR /&gt;suppressed: false&lt;BR /&gt;task-details:&lt;BR /&gt;- fault-message: "Publish cannot be performed without entering a session name and description."&lt;BR /&gt;--------------------------------------------------END&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;So I altered the command to include the session description:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Expert@mgmt:0]# mgmt_cli set session description "API Session test" add host --batch cli_mgmt_test.csv&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;This time it failed with the following error:&lt;/P&gt;&lt;P&gt;--------------------------------------------------START&lt;BR /&gt;Line 2: code: "generic_err_invalid_parameter_name"&lt;BR /&gt;message: "Unrecognized parameter [ip-address]"&lt;/P&gt;&lt;P&gt;Line 3: code: "generic_err_invalid_parameter_name"&lt;BR /&gt;message: "Unrecognized parameter [ip-address]"&lt;/P&gt;&lt;P&gt;Line 4: code: "generic_err_invalid_parameter_name"&lt;BR /&gt;message: "Unrecognized parameter [ip-address]"&lt;/P&gt;&lt;P&gt;Line 5: code: "generic_err_invalid_parameter_name"&lt;BR /&gt;message: "Unrecognized parameter [ip-address]"&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Executed command failed. Changes are discarded.&lt;BR /&gt;--------------------------------------------------END&lt;/P&gt;&lt;P&gt;My .csv look like this:&lt;/P&gt;&lt;P&gt;[Expert@mgmt:0]# cat cli_mgmt_test.csv&lt;BR /&gt;name,ip-address,color,comments&lt;BR /&gt;net-test.svr.1,169.254.0.1,red,this is a test -- delete once complete&lt;BR /&gt;net-test.svr.2,169.254.0.2,red,this is a test -- delete once complete&lt;BR /&gt;net-test.svr.3,169.254.0.3,red,this is a test -- delete once complete&lt;BR /&gt;net-test.svr.4,169.254.0.4,red,this is a test -- delete once complete&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas why its not liking the ip-address? I've also tried using 'ipv4-address' with same failure. I'm able to create the hosts directly on Smartconsole but want to know how to create hosts via a batch script.&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
    <pubDate>Sat, 01 Apr 2023 22:16:51 GMT</pubDate>
    <dc:creator>Net_Works</dc:creator>
    <dc:date>2023-04-01T22:16:51Z</dc:date>
    <item>
      <title>mgmt_cli  -- message: "Unrecognized parameter [ip-address]</title>
      <link>https://community.checkpoint.com/t5/General-Topics/mgmt-cli-message-quot-Unrecognized-parameter-ip-address/m-p/176996#M29458</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I'm trying to use 'mgmt_cli' to add multiple hosts to our management server (81.10). I'm following the format in the 'Management API Reference'. I've created a .csv file and tried to import using --batch:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Expert@mgmt:0]# mgmt_cli add host --batch cli_mgmt_test.csv:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;At first this failed with the following error&lt;/P&gt;&lt;P&gt;---------------------------------------------START&lt;BR /&gt;Time: [22:34:12] 1/4/2023&lt;BR /&gt;---------------------------------------------&lt;BR /&gt;"Publish operation" failed (100%)&lt;BR /&gt;Publish failed, the following error has occurred:&lt;BR /&gt;tasks:&lt;BR /&gt;- task-id: "01234567-89ab-cdef-bfad-4320b3d28dca"&lt;BR /&gt;task-name: "Publish operation"&lt;BR /&gt;status: "failed"&lt;BR /&gt;progress-percentage: 100&lt;BR /&gt;suppressed: false&lt;BR /&gt;task-details:&lt;BR /&gt;- fault-message: "Publish cannot be performed without entering a session name and description."&lt;BR /&gt;--------------------------------------------------END&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;So I altered the command to include the session description:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Expert@mgmt:0]# mgmt_cli set session description "API Session test" add host --batch cli_mgmt_test.csv&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;This time it failed with the following error:&lt;/P&gt;&lt;P&gt;--------------------------------------------------START&lt;BR /&gt;Line 2: code: "generic_err_invalid_parameter_name"&lt;BR /&gt;message: "Unrecognized parameter [ip-address]"&lt;/P&gt;&lt;P&gt;Line 3: code: "generic_err_invalid_parameter_name"&lt;BR /&gt;message: "Unrecognized parameter [ip-address]"&lt;/P&gt;&lt;P&gt;Line 4: code: "generic_err_invalid_parameter_name"&lt;BR /&gt;message: "Unrecognized parameter [ip-address]"&lt;/P&gt;&lt;P&gt;Line 5: code: "generic_err_invalid_parameter_name"&lt;BR /&gt;message: "Unrecognized parameter [ip-address]"&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Executed command failed. Changes are discarded.&lt;BR /&gt;--------------------------------------------------END&lt;/P&gt;&lt;P&gt;My .csv look like this:&lt;/P&gt;&lt;P&gt;[Expert@mgmt:0]# cat cli_mgmt_test.csv&lt;BR /&gt;name,ip-address,color,comments&lt;BR /&gt;net-test.svr.1,169.254.0.1,red,this is a test -- delete once complete&lt;BR /&gt;net-test.svr.2,169.254.0.2,red,this is a test -- delete once complete&lt;BR /&gt;net-test.svr.3,169.254.0.3,red,this is a test -- delete once complete&lt;BR /&gt;net-test.svr.4,169.254.0.4,red,this is a test -- delete once complete&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas why its not liking the ip-address? I've also tried using 'ipv4-address' with same failure. I'm able to create the hosts directly on Smartconsole but want to know how to create hosts via a batch script.&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Sat, 01 Apr 2023 22:16:51 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/General-Topics/mgmt-cli-message-quot-Unrecognized-parameter-ip-address/m-p/176996#M29458</guid>
      <dc:creator>Net_Works</dc:creator>
      <dc:date>2023-04-01T22:16:51Z</dc:date>
    </item>
    <item>
      <title>Re: mgmt_cli  -- message: "Unrecognized parameter [ip-address]</title>
      <link>https://community.checkpoint.com/t5/General-Topics/mgmt-cli-message-quot-Unrecognized-parameter-ip-address/m-p/176999#M29459</link>
      <description>&lt;P&gt;This should be two separate commands:&lt;/P&gt;
&lt;P&gt;mgmt_cli set session description “API Test”&lt;BR /&gt;mgmt_cli&amp;nbsp;add host --batch cli_mgmt_test.csv&lt;/P&gt;</description>
      <pubDate>Sun, 02 Apr 2023 02:03:23 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/General-Topics/mgmt-cli-message-quot-Unrecognized-parameter-ip-address/m-p/176999#M29459</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2023-04-02T02:03:23Z</dc:date>
    </item>
    <item>
      <title>Re: mgmt_cli  -- message: "Unrecognized parameter [ip-address]</title>
      <link>https://community.checkpoint.com/t5/General-Topics/mgmt-cli-message-quot-Unrecognized-parameter-ip-address/m-p/177001#M29460</link>
      <description>&lt;P&gt;Hi Phoneboy,&lt;/P&gt;&lt;P&gt;Just tried and get the following error on the first cmd:&lt;BR /&gt;&lt;BR /&gt;--------------------------------------START&lt;BR /&gt;[Expert@mgmt:0]# mgmt_cli set session description “API Test”&lt;BR /&gt;Username: [myusername]&lt;BR /&gt;Password: [mypassword]&lt;BR /&gt;&lt;BR /&gt;Error: The parameters of set-session command should be provided in pairs (key and value). You have provided an odd number of parameters which suggests that you are probably missing a parameter.&lt;BR /&gt;[Expert@mgmt:0]#&lt;BR /&gt;--------------------------------------END&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Kind Rgds&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 02 Apr 2023 07:57:22 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/General-Topics/mgmt-cli-message-quot-Unrecognized-parameter-ip-address/m-p/177001#M29460</guid>
      <dc:creator>Net_Works</dc:creator>
      <dc:date>2023-04-02T07:57:22Z</dc:date>
    </item>
    <item>
      <title>Re: mgmt_cli  -- message: "Unrecognized parameter [ip-address]</title>
      <link>https://community.checkpoint.com/t5/General-Topics/mgmt-cli-message-quot-Unrecognized-parameter-ip-address/m-p/177020#M29465</link>
      <description>&lt;P&gt;See sk113078. Your csv filename shouldn't contain underscores.&lt;/P&gt;</description>
      <pubDate>Sun, 02 Apr 2023 14:52:16 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/General-Topics/mgmt-cli-message-quot-Unrecognized-parameter-ip-address/m-p/177020#M29465</guid>
      <dc:creator>mcatanzaro</dc:creator>
      <dc:date>2023-04-02T14:52:16Z</dc:date>
    </item>
    <item>
      <title>Re: mgmt_cli  -- message: "Unrecognized parameter [ip-address]</title>
      <link>https://community.checkpoint.com/t5/General-Topics/mgmt-cli-message-quot-Unrecognized-parameter-ip-address/m-p/177064#M29469</link>
      <description>&lt;P&gt;Hi, I removed the underscores from the .csv but get the same issue.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Sun, 02 Apr 2023 22:16:40 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/General-Topics/mgmt-cli-message-quot-Unrecognized-parameter-ip-address/m-p/177064#M29469</guid>
      <dc:creator>Net_Works</dc:creator>
      <dc:date>2023-04-02T22:16:40Z</dc:date>
    </item>
    <item>
      <title>Re: mgmt_cli  -- message: "Unrecognized parameter [ip-address]</title>
      <link>https://community.checkpoint.com/t5/General-Topics/mgmt-cli-message-quot-Unrecognized-parameter-ip-address/m-p/177068#M29470</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;This took a little while to figure out as I'm quite new when it comes to APIs.&lt;BR /&gt;&lt;BR /&gt;Anyway, after a bit more reading and playing around, I managed to figure it out -- as Im using 81.10, I have a windows version of&amp;nbsp; mgmt_cli.exe so created a local script pointing to my management server with a local copy of the .csv file. Here is a copy of the working script:&lt;BR /&gt;&lt;BR /&gt;----------------------START&lt;BR /&gt;mgmt_cli.exe login -u myusername -p mypassword -m [mgmt IP address] &amp;gt; C:\Users\username\Documents\id.txt&lt;BR /&gt;mgmt_cli.exe add host --batch C:\Users\username\Documents\cli-mgmt-test.csv -s C:\Users\username\Documents\id.txt&lt;BR /&gt;mgmt_cli.exe set session description "API Session Test" new-name "username@03042023" -s C:\Users\username\Documents\id.txt&lt;BR /&gt;mgmt_cli.exe publish -s C:\Users\username\Documents\id.txt&lt;BR /&gt;mgmt_cli.exe logout -s C:\Users\username\Documents\id.txt&lt;BR /&gt;----------------------END&lt;/P&gt;&lt;P&gt;Simple I know but chuffed to get this working -- can now build on this for all sorts of tasks.&lt;BR /&gt;&lt;BR /&gt;Thanks all and hope someone finds this useful &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Chris.&lt;/P&gt;</description>
      <pubDate>Sun, 02 Apr 2023 23:26:52 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/General-Topics/mgmt-cli-message-quot-Unrecognized-parameter-ip-address/m-p/177068#M29470</guid>
      <dc:creator>Net_Works</dc:creator>
      <dc:date>2023-04-02T23:26:52Z</dc:date>
    </item>
  </channel>
</rss>

