<?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 Re: Inventory gateway script in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Inventory-gateway-script/m-p/13409#M948</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;show-gateways-and-servers API command should help.&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://sc1.checkpoint.com/documents/latest/APIs/index.html#gui-cli/show-gateways-and-servers~v1.1%20" title="https://sc1.checkpoint.com/documents/latest/APIs/index.html#gui-cli/show-gateways-and-servers~v1.1%20"&gt;Check Point - Management API reference&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 26 Jul 2018 17:13:22 GMT</pubDate>
    <dc:creator>Tomer_Sole</dc:creator>
    <dc:date>2018-07-26T17:13:22Z</dc:date>
    <item>
      <title>Inventory gateway script</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Inventory-gateway-script/m-p/13408#M947</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;New to scripting , how do I run gateway-inventory script on MDS?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jul 2018 22:54:11 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Inventory-gateway-script/m-p/13408#M947</guid>
      <dc:creator>Stan_Mazur</dc:creator>
      <dc:date>2018-07-25T22:54:11Z</dc:date>
    </item>
    <item>
      <title>Re: Inventory gateway script</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Inventory-gateway-script/m-p/13409#M948</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;show-gateways-and-servers API command should help.&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://sc1.checkpoint.com/documents/latest/APIs/index.html#gui-cli/show-gateways-and-servers~v1.1%20" title="https://sc1.checkpoint.com/documents/latest/APIs/index.html#gui-cli/show-gateways-and-servers~v1.1%20"&gt;Check Point - Management API reference&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jul 2018 17:13:22 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Inventory-gateway-script/m-p/13409#M948</guid>
      <dc:creator>Tomer_Sole</dc:creator>
      <dc:date>2018-07-26T17:13:22Z</dc:date>
    </item>
    <item>
      <title>Re: Inventory gateway script</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Inventory-gateway-script/m-p/13410#M949</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This was asked before here and I put small script together&amp;nbsp;&lt;IMG src="https://community.checkpoint.com/legacyfs/online/checkpoint/emoticons/cool.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.checkpoint.com/thread/7023-security-gateway-inventory" target="_blank"&gt;https://community.checkpoint.com/thread/7023-security-gateway-inventory&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jun 2019 09:03:29 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Inventory-gateway-script/m-p/13410#M949</guid>
      <dc:creator>Kaspars_Zibarts</dc:creator>
      <dc:date>2019-06-21T09:03:29Z</dc:date>
    </item>
    <item>
      <title>Re: Inventory gateway script</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Inventory-gateway-script/m-p/75952#M4417</link>
      <description>&lt;P&gt;How do I run this from the SmartConsole server?&lt;/P&gt;</description>
      <pubDate>Thu, 20 Feb 2020 22:10:13 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Inventory-gateway-script/m-p/75952#M4417</guid>
      <dc:creator>jekyllsdrk</dc:creator>
      <dc:date>2020-02-20T22:10:13Z</dc:date>
    </item>
    <item>
      <title>Re: Inventory gateway script</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Inventory-gateway-script/m-p/75969#M4418</link>
      <description>Using the mgmt_cli binary included in the same directory as the SmartConsole binary.&lt;BR /&gt;It works the same way as it does on the Check Point management server.</description>
      <pubDate>Fri, 21 Feb 2020 04:55:53 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Inventory-gateway-script/m-p/75969#M4418</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2020-02-21T04:55:53Z</dc:date>
    </item>
    <item>
      <title>Re: Inventory gateway script</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Inventory-gateway-script/m-p/76008#M4421</link>
      <description>&lt;P&gt;I am presented with a Username prompt when I attempt to run the following command on the management server.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;[Expert@cpman:0]# mgmt_cli show gateways-and-servers&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Username:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Why am I receiving this prompt, and what credentials should I use?&lt;FONT face="courier new,courier"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Feb 2020 15:25:27 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Inventory-gateway-script/m-p/76008#M4421</guid>
      <dc:creator>jekyllsdrk</dc:creator>
      <dc:date>2020-02-21T15:25:27Z</dc:date>
    </item>
    <item>
      <title>Re: Inventory gateway script</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Inventory-gateway-script/m-p/76009#M4422</link>
      <description>&lt;P&gt;I tried entering the admin credentials but received the following error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;[Expert@cpman:0]# mgmt_cli show gateways-and-servers&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Username: admin&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Password:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;message: "Command execution failed. Response body is empty"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;code: "generic_error"&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Feb 2020 15:30:42 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Inventory-gateway-script/m-p/76009#M4422</guid>
      <dc:creator>jekyllsdrk</dc:creator>
      <dc:date>2020-02-21T15:30:42Z</dc:date>
    </item>
    <item>
      <title>Re: Inventory gateway script</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Inventory-gateway-script/m-p/76019#M4423</link>
      <description>&lt;P&gt;You have to work with mgmt_cli exactly the same way as if you were coding against the API.&lt;BR /&gt;This means:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Logging in to create a session&lt;/LI&gt;
&lt;LI&gt;Performing whatever changes you wish to make&lt;/LI&gt;
&lt;LI&gt;If you want to commit the changes you made, issue a "publish" action.&lt;/LI&gt;
&lt;LI&gt;When you're done, log out of the session.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;If you're on the management server itself, you can use -r true to bypass doing all of the above, but the above happens "under the covers."&lt;BR /&gt;When running from a Windows machine, you're obviously not on the management server, so you have to do the entire flow.&lt;/P&gt;
&lt;P&gt;For your specific example, this means something like:&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;FONT face="courier new,courier"&gt;C:\Program Files (x86)\CheckPoint\SmartConsole\R80.30\PROGRAM&amp;gt; &lt;STRONG&gt;mgmt_cli -m 3.80.173.165 -u aa -p aaaa login &amp;gt; \temp\sid.txt&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;This logs in with the username aa, password aaaa, and writes the session information to \temp\sid.txt so it can be used later.&lt;BR /&gt;Then you can issue the command to show gateways-and-servers:&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;FONT face="courier new,courier"&gt;C:\Program Files (x86)\CheckPoint\SmartConsole\R80.30\PROGRAM&amp;gt; &lt;STRONG&gt;mgmt_cli -m 3.80.173.65 -s \temp\sid.txt show gateways-and-servers&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;FONT face="courier new,courier"&gt;- uid: "453ea708-cb36-4ca1-8c51-831e86c7a5d3"&lt;BR /&gt;&amp;nbsp; name: "BranchOffice"&lt;BR /&gt;&amp;nbsp; type: "simple-gateway"&lt;BR /&gt;&amp;nbsp; domain:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; uid: "41e821a0-3720-11e3-aa6e-0800200c9fde"&lt;BR /&gt;&amp;nbsp; &amp;nbsp; name: "SMC User"&lt;BR /&gt;&amp;nbsp; &amp;nbsp; domain-type: "domain"&lt;BR /&gt;- uid: "7f994e69-f997-47bd-9f80-621cf622941e"&lt;BR /&gt;&amp;nbsp; name: "Corporate-GW"&lt;BR /&gt;&amp;nbsp; type: "simple-gateway"&lt;BR /&gt;&amp;nbsp; domain:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; uid: "41e821a0-3720-11e3-aa6e-0800200c9fde"&lt;BR /&gt;&amp;nbsp; &amp;nbsp; name: "SMC User"&lt;BR /&gt;&amp;nbsp; &amp;nbsp; domain-type: "domain"&lt;BR /&gt;- uid: "a9f2d9bd-35e4-4571-bebb-4aeec04730df"&lt;BR /&gt;&amp;nbsp; name: "EuropeBranchGw"&lt;BR /&gt;&amp;nbsp; type: "simple-gateway"&lt;BR /&gt;&amp;nbsp; domain:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; uid: "41e821a0-3720-11e3-aa6e-0800200c9fde"&lt;BR /&gt;&amp;nbsp; &amp;nbsp; name: "SMC User"&lt;BR /&gt;&amp;nbsp; &amp;nbsp; domain-type: "domain"&lt;BR /&gt;- uid: "b69b4a9c-1386-4bb1-8057-926551cfcdad"&lt;BR /&gt;&amp;nbsp; name: "HQgw"&lt;BR /&gt;&amp;nbsp; type: "simple-gateway"&lt;BR /&gt;&amp;nbsp; domain:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; uid: "41e821a0-3720-11e3-aa6e-0800200c9fde"&lt;BR /&gt;&amp;nbsp; &amp;nbsp; name: "SMC User"&lt;BR /&gt;&amp;nbsp; &amp;nbsp; domain-type: "domain"&lt;BR /&gt;- uid: "e1fdc743-e9c8-df44-95bd-b842bcbac362"&lt;BR /&gt;&amp;nbsp; name: "mgmt"&lt;BR /&gt;&amp;nbsp; type: "CpmiHostCkp"&lt;BR /&gt;&amp;nbsp; domain:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; uid: "41e821a0-3720-11e3-aa6e-0800200c9fde"&lt;BR /&gt;&amp;nbsp; &amp;nbsp; name: "SMC User"&lt;BR /&gt;&amp;nbsp; &amp;nbsp; domain-type: "domain"&lt;BR /&gt;- uid: "71ec8bfb-5924-4672-a207-0682e46285ad"&lt;BR /&gt;&amp;nbsp; name: "Remote-1-gw"&lt;BR /&gt;&amp;nbsp; type: "simple-gateway"&lt;BR /&gt;&amp;nbsp; domain:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; uid: "41e821a0-3720-11e3-aa6e-0800200c9fde"&lt;BR /&gt;&amp;nbsp; &amp;nbsp; name: "SMC User"&lt;BR /&gt;&amp;nbsp; &amp;nbsp; domain-type: "domain"&lt;BR /&gt;- uid: "95201290-08b3-405f-a4ae-0785f76e8e4b"&lt;BR /&gt;&amp;nbsp; name: "Remote-2-gw"&lt;BR /&gt;&amp;nbsp; type: "simple-gateway"&lt;BR /&gt;&amp;nbsp; domain:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; uid: "41e821a0-3720-11e3-aa6e-0800200c9fde"&lt;BR /&gt;&amp;nbsp; &amp;nbsp; name: "SMC User"&lt;BR /&gt;&amp;nbsp; &amp;nbsp; domain-type: "domain"&lt;BR /&gt;- uid: "2c68301f-e1f9-4ce4-af46-8f4ded4a9fd2"&lt;BR /&gt;&amp;nbsp; name: "Remote-3-gw"&lt;BR /&gt;&amp;nbsp; type: "simple-gateway"&lt;BR /&gt;&amp;nbsp; domain:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; uid: "41e821a0-3720-11e3-aa6e-0800200c9fde"&lt;BR /&gt;&amp;nbsp; &amp;nbsp; name: "SMC User"&lt;BR /&gt;&amp;nbsp; &amp;nbsp; domain-type: "domain"&lt;BR /&gt;- uid: "167c76ab-12d2-4e34-834a-00ea056289d3"&lt;BR /&gt;&amp;nbsp; name: "Remote-4-gw"&lt;BR /&gt;&amp;nbsp; type: "simple-gateway"&lt;BR /&gt;&amp;nbsp; domain:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; uid: "41e821a0-3720-11e3-aa6e-0800200c9fde"&lt;BR /&gt;&amp;nbsp; &amp;nbsp; name: "SMC User"&lt;BR /&gt;&amp;nbsp; &amp;nbsp; domain-type: "domain"&lt;BR /&gt;- uid: "004b689b-797a-4212-b21c-8df4c8b992e3"&lt;BR /&gt;&amp;nbsp; name: "Remote-5-gw"&lt;BR /&gt;&amp;nbsp; type: "simple-gateway"&lt;BR /&gt;&amp;nbsp; domain:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; uid: "41e821a0-3720-11e3-aa6e-0800200c9fde"&lt;BR /&gt;&amp;nbsp; &amp;nbsp; name: "SMC User"&lt;BR /&gt;&amp;nbsp; &amp;nbsp; domain-type: "domain"&lt;BR /&gt;- uid: "f6bb4929-a831-406a-93da-af6f95525437"&lt;BR /&gt;&amp;nbsp; name: "RemoteBranchGw"&lt;BR /&gt;&amp;nbsp; type: "simple-gateway"&lt;BR /&gt;&amp;nbsp; domain:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; uid: "41e821a0-3720-11e3-aa6e-0800200c9fde"&lt;BR /&gt;&amp;nbsp; &amp;nbsp; name: "SMC User"&lt;BR /&gt;&amp;nbsp; &amp;nbsp; domain-type: "domain"&lt;BR /&gt;- uid: "37b07654-bc93-469a-9991-27a3b757e9aa"&lt;BR /&gt;&amp;nbsp; name: "ThreatEmulationDevice"&lt;BR /&gt;&amp;nbsp; type: "simple-gateway"&lt;BR /&gt;&amp;nbsp; domain:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; uid: "41e821a0-3720-11e3-aa6e-0800200c9fde"&lt;BR /&gt;&amp;nbsp; &amp;nbsp; name: "SMC User"&lt;BR /&gt;&amp;nbsp; &amp;nbsp; domain-type: "domain"&lt;BR /&gt;from: 1&lt;BR /&gt;to: 12&lt;BR /&gt;total: 12&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Since you're not making any changes here, no publish is required.&lt;BR /&gt;Logout to release the session:&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;FONT face="courier new,courier"&gt;C:\Program Files (x86)\CheckPoint\SmartConsole\R80.30\PROGRAM&amp;gt; &lt;STRONG&gt;mgmt_cli -m 3.80.173.65 -s \temp\sid.txt logout&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Feb 2020 20:50:50 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Inventory-gateway-script/m-p/76019#M4423</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2020-02-21T20:50:50Z</dc:date>
    </item>
  </channel>
</rss>

