<?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: Using cpinfo and cphaprob in a script in Firewall and Security Management</title>
    <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Using-cpinfo-and-cphaprob-in-a-script/m-p/149240#M23902</link>
    <description>&lt;P&gt;Hey,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are you running the commands in CLISH ?&lt;/P&gt;&lt;P&gt;For result redirection to a file, I recommend to run them in bash (under expert mode) .&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;cpinfo -y all &amp;gt; mytextfile.log&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;cphaprob stat&amp;nbsp;&amp;nbsp;&amp;gt; mytextfile.log&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Or you can grab that response and email it, do whatever.....&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 23 May 2022 10:55:28 GMT</pubDate>
    <dc:creator>Sorin_Gogean</dc:creator>
    <dc:date>2022-05-23T10:55:28Z</dc:date>
    <item>
      <title>Using cpinfo and cphaprob in a script</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Using-cpinfo-and-cphaprob-in-a-script/m-p/149239#M23901</link>
      <description>&lt;P&gt;Hi all,&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am running a script on my R81 gateways.&lt;BR /&gt;&lt;/SPAN&gt;I want the output from "cpinfo -y all" and "cphaprob stat" to be directed into a textfile.&lt;BR /&gt;&lt;BR /&gt;When I login to the gateways as expert and run the script, everything looks good.&lt;BR /&gt;When I login to Web GUI and configures the Job Scheduler to run the script, it doesn't look good.&amp;nbsp;&amp;nbsp;‌‌&lt;BR /&gt;&lt;BR /&gt;"cpinfo -y all" says:&lt;BR /&gt;Warning: failed getting the list of all products installed on the machine.&lt;BR /&gt;&lt;BR /&gt;"cphaprob stat" says:&lt;BR /&gt;This is Check Point CPinfo Build 914000215 for GAIA&lt;BR /&gt;No Checkpoint product on this machine&lt;BR /&gt;Upload mode only&lt;BR /&gt;&lt;BR /&gt;What should I do, to make the CP commands see, that the machine is a R81 gateway?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Kind regards&amp;nbsp;&lt;BR /&gt;&amp;nbsp; Jan&lt;/P&gt;</description>
      <pubDate>Mon, 23 May 2022 10:38:00 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Using-cpinfo-and-cphaprob-in-a-script/m-p/149239#M23901</guid>
      <dc:creator>Mudderkagen</dc:creator>
      <dc:date>2022-05-23T10:38:00Z</dc:date>
    </item>
    <item>
      <title>Re: Using cpinfo and cphaprob in a script</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Using-cpinfo-and-cphaprob-in-a-script/m-p/149240#M23902</link>
      <description>&lt;P&gt;Hey,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are you running the commands in CLISH ?&lt;/P&gt;&lt;P&gt;For result redirection to a file, I recommend to run them in bash (under expert mode) .&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;cpinfo -y all &amp;gt; mytextfile.log&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;cphaprob stat&amp;nbsp;&amp;nbsp;&amp;gt; mytextfile.log&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Or you can grab that response and email it, do whatever.....&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 23 May 2022 10:55:28 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Using-cpinfo-and-cphaprob-in-a-script/m-p/149240#M23902</guid>
      <dc:creator>Sorin_Gogean</dc:creator>
      <dc:date>2022-05-23T10:55:28Z</dc:date>
    </item>
    <item>
      <title>Re: Using cpinfo and cphaprob in a script</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Using-cpinfo-and-cphaprob-in-a-script/m-p/149243#M23903</link>
      <description>&lt;P&gt;You need to refer using source to the CP environment variables, see for details&amp;nbsp;&lt;A id="link_2_27d87a3d27eacd_4_4a857" class="page-link lia-link-navigation lia-custom-event" href="https://community.checkpoint.com/t5/Management/Calling-a-Bash-Script-in-Cron/m-p/13489?search-action-id=43908355801&amp;amp;search-result-uid=13489" target="_blank" rel="noopener"&gt;Calling a Bash Script in Cron&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 23 May 2022 11:51:47 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Using-cpinfo-and-cphaprob-in-a-script/m-p/149243#M23903</guid>
      <dc:creator>G_W_Albrecht</dc:creator>
      <dc:date>2022-05-23T11:51:47Z</dc:date>
    </item>
    <item>
      <title>Re: Using cpinfo and cphaprob in a script</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Using-cpinfo-and-cphaprob-in-a-script/m-p/149244#M23904</link>
      <description>&lt;DIV class=""&gt;
&lt;P&gt;I recommend to add the line below on top of your script:&lt;/P&gt;
&lt;LI-CODE lang="none"&gt;source /etc/profile.d/CP.sh;‍‍&lt;/LI-CODE&gt;
&lt;P&gt;In case you also wish to create similar scripts on VSX systems, just add this line as well:&lt;/P&gt;
&lt;LI-CODE lang="none"&gt;source /etc/profile.d/vsenv.sh;‍‍&lt;/LI-CODE&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 23 May 2022 11:38:44 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Using-cpinfo-and-cphaprob-in-a-script/m-p/149244#M23904</guid>
      <dc:creator>Danny</dc:creator>
      <dc:date>2022-05-23T11:38:44Z</dc:date>
    </item>
    <item>
      <title>Re: Using cpinfo and cphaprob in a script</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Using-cpinfo-and-cphaprob-in-a-script/m-p/149263#M23908</link>
      <description>&lt;P&gt;Thanks a lot for the precise info.&amp;nbsp;&lt;BR /&gt;Now I got it working on my R81 hardware gateway AND on my R81.10 VSX. &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Best regards&amp;nbsp;&lt;BR /&gt;&amp;nbsp; Jan&lt;/P&gt;</description>
      <pubDate>Mon, 23 May 2022 13:57:06 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Using-cpinfo-and-cphaprob-in-a-script/m-p/149263#M23908</guid>
      <dc:creator>Mudderkage</dc:creator>
      <dc:date>2022-05-23T13:57:06Z</dc:date>
    </item>
  </channel>
</rss>

