<?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: Add Group from one Domain to another in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Add-Group-from-one-Domain-to-another/m-p/115097#M5747</link>
    <description>&lt;P&gt;Good Morning,&lt;/P&gt;&lt;P&gt;The networks are global.&lt;BR /&gt;&lt;BR /&gt;I thought there may have been an easier way rather than manually doing the copy and paste from the output and putting it into the lines shown below.&lt;/P&gt;&lt;P&gt;I tried to open the JSON in Excel, but that didn't work out for me the way I wanted it to.&amp;nbsp;&lt;/P&gt;&lt;P&gt;add network name "enet_SFB_13.107.64.0_18" subnet "13.107.64.0" subnet-mask "255.255.192.0"&lt;/P&gt;&lt;P&gt;add group name "grp_Office365."&lt;BR /&gt;set group name "grp_Office365." members.1 "ehost_13.107.64.0_18" members.2 "ehost_52.112.0.0_14" members.3 "ehost_52.120.0.0_14" members.4 "ehost_52.238.119.141_32" members.5 "ehost_52.244.160.207_32"&lt;/P&gt;</description>
    <pubDate>Thu, 01 Apr 2021 11:06:42 GMT</pubDate>
    <dc:creator>chauhac1</dc:creator>
    <dc:date>2021-04-01T11:06:42Z</dc:date>
    <item>
      <title>Add Group from one Domain to another</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Add-Group-from-one-Domain-to-another/m-p/115065#M5743</link>
      <description>&lt;P&gt;Good Evening All,&lt;/P&gt;&lt;P&gt;I'm new to Check Points so if this has been answered please let me know.&lt;/P&gt;&lt;P&gt;I have a group that is on another Domain in the Smart Console, however, that has 365 networks added.&lt;/P&gt;&lt;P&gt;I need to get that group onto another Domain within Smart Console.&lt;/P&gt;&lt;P&gt;I have got as far as&lt;/P&gt;&lt;P&gt;show group name grp_Office365 --format json&lt;/P&gt;&lt;P&gt;show group name grp_Office365&lt;BR /&gt;&lt;BR /&gt;I have the outputs saved on Notepad ++, however, I'm a little stuck on how I paste the output onto the new domains CLI.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Adding the hosts individually via the GUI is taking forever, however, the CLI output took half the time it took me to add 25 entries to the new group!&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Surely, there is a way of getting my show group output into the new domain with a strategic copy and paste.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Mar 2021 21:07:10 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Add-Group-from-one-Domain-to-another/m-p/115065#M5743</guid>
      <dc:creator>chauhac1</dc:creator>
      <dc:date>2021-03-31T21:07:10Z</dc:date>
    </item>
    <item>
      <title>Re: Add Group from one Domain to another</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Add-Group-from-one-Domain-to-another/m-p/115066#M5744</link>
      <description>&lt;P&gt;You're assuming that all of those networks are defined exactly the same way and exactly with the same name on the other domain.&lt;BR /&gt;Unless the objects in question are global, that is NOT necessarily a safe assumption.&lt;BR /&gt;Further, the API generally limits the number of results returned, so you may need to do queries with limit/offset to get all the results.&lt;/P&gt;
&lt;P&gt;Assuming you resolve all that, the command is "set group"&lt;BR /&gt;&lt;A href="https://sc1.checkpoint.com/documents/latest/APIs/index.html#cli/set-group~v1.7%20" target="_blank"&gt;https://sc1.checkpoint.com/documents/latest/APIs/index.html#cli/set-group~v1.7%20&lt;/A&gt;&lt;BR /&gt;You could iterate through each item and add it to the relevant group:&lt;/P&gt;
&lt;PRE class="code"&gt;mgmt_cli set group name "MyGroup" members.add "MyHostName"&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Mar 2021 22:56:37 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Add-Group-from-one-Domain-to-another/m-p/115066#M5744</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2021-03-31T22:56:37Z</dc:date>
    </item>
    <item>
      <title>Re: Add Group from one Domain to another</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Add-Group-from-one-Domain-to-another/m-p/115097#M5747</link>
      <description>&lt;P&gt;Good Morning,&lt;/P&gt;&lt;P&gt;The networks are global.&lt;BR /&gt;&lt;BR /&gt;I thought there may have been an easier way rather than manually doing the copy and paste from the output and putting it into the lines shown below.&lt;/P&gt;&lt;P&gt;I tried to open the JSON in Excel, but that didn't work out for me the way I wanted it to.&amp;nbsp;&lt;/P&gt;&lt;P&gt;add network name "enet_SFB_13.107.64.0_18" subnet "13.107.64.0" subnet-mask "255.255.192.0"&lt;/P&gt;&lt;P&gt;add group name "grp_Office365."&lt;BR /&gt;set group name "grp_Office365." members.1 "ehost_13.107.64.0_18" members.2 "ehost_52.112.0.0_14" members.3 "ehost_52.120.0.0_14" members.4 "ehost_52.238.119.141_32" members.5 "ehost_52.244.160.207_32"&lt;/P&gt;</description>
      <pubDate>Thu, 01 Apr 2021 11:06:42 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Add-Group-from-one-Domain-to-another/m-p/115097#M5747</guid>
      <dc:creator>chauhac1</dc:creator>
      <dc:date>2021-04-01T11:06:42Z</dc:date>
    </item>
    <item>
      <title>Re: Add Group from one Domain to another</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Add-Group-from-one-Domain-to-another/m-p/115432#M5771</link>
      <description>&lt;P&gt;add network name enet_SFB_13.107.64.0_18 subnet 13.107.64.0 subnet-mask 255.255.192.0&lt;BR /&gt;add network name enet_SFB_52.112.0.0_14 subnet 52.112.0.0 subnet-mask 255.252.0.0&lt;BR /&gt;&lt;BR /&gt;set network name enet_SFB_13.107.64.0_18 groups grp_Office365.&lt;BR /&gt;set network name enet_SFB_52.112.0.0_14 groups grp_Office365.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I then found out, there are updateable objects, however, the learning curve was great, which means going forwards, I know how to make life easier.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Apr 2021 21:08:24 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Add-Group-from-one-Domain-to-another/m-p/115432#M5771</guid>
      <dc:creator>chauhac1</dc:creator>
      <dc:date>2021-04-06T21:08:24Z</dc:date>
    </item>
  </channel>
</rss>

