<?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 MS Powershell Scripts for calling Check Point API in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/MS-Powershell-Scripts-for-calling-Check-Point-API/m-p/38883#M2362</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;H2&gt;Overview&lt;/H2&gt;&lt;P&gt;The 3 scripts that are made available here are:&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/jlebowitsch/powershellscripts/blob/master/CPAPI-Authenticate.ps1" title="CPAPI-Authenticate.ps1"&gt;&lt;SPAN style="font-size: 10.5pt; font-family: 'Segoe UI','sans-serif'; color: #4078c0; background: whitesmoke;"&gt;CPAPI-Authenticate.ps1&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.5pt; font-family: 'Segoe UI','sans-serif'; color: #4078c0; background: whitesmoke;"&gt;&lt;A href="https://github.com/jlebowitsch/powershellscripts/blob/master/CPAPI-Show-Hosts.ps1"&gt;CPAPI-Show-Hosts.ps1&lt;/A&gt;​&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/jlebowitsch/powershellscripts/blob/master/CPAPI-Add-Host.ps1" title="CPAPI-Add-Host.ps1"&gt;&lt;SPAN style="font-size: 10.5pt; font-family: 'Segoe UI','sans-serif'; color: #4078c0; background: whitesmoke;"&gt;CPAPI-Add-Host.ps1&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;They are meant to serve as proof of concept for building a modular library of such scripts, with an eye towards creating a Powershell module that will allow users to manage Check Point deployments from Microsoft Powershell, in a fashion similar to the Azure and AWS modules.&lt;/P&gt;&lt;P&gt;CPAPI-Authentiate.ps1 is a self-standing script for authenticating users and getting from the management server the security id that allows users to authenticate when using the API. The other scripts each hit a different API, and use the token and server objects created by the Authentication script, in the construction of the requests they create. The 2 scripts invoke the authentication script if they fail to find valid objects.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H2&gt;Description&lt;/H2&gt;&lt;P&gt;See &lt;A href="https://github.com/jlebowitsch/powershellscripts/blob/master/Powershell%20Scripts%20using%20Check%20Point%20API%20PoC%20intro.pdf"&gt;this doc&lt;/A&gt; and the help sections of the script&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H2&gt;Instructions&lt;/H2&gt;&lt;P&gt;Download the three CPAPI-xxx.ps1 scripts from &lt;A href="https://github.com/jlebowitsch/powershellscripts"&gt; here&lt;/A&gt; to some one folder on your machine (They all need to be on the same folder).&lt;/P&gt;&lt;P&gt;Use Powershell ISE (preferred) or Powershell to execute the scripts thus:.\CPAPI-Authenticate.ps1&lt;/P&gt;&lt;P&gt;Use get-help .\CPAPI-Authenticate.ps1 to see some help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H2&gt;Code Version&lt;/H2&gt;&lt;P&gt;Code version 0.0.1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H2&gt;Tested on version&lt;/H2&gt;&lt;P&gt;R80, API version 1.0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="font-size: 13px; color: #ff0000;"&gt;&lt;STRONG&gt;NOTICE: &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.6667px; color: #999999;"&gt;&lt;STRONG&gt;By using this sample code you agree to terms and conditions in this &lt;A href="https://community.checkpoint.com/docs/DOC-1042"&gt;Not authorized to view the specified document 1042&lt;/A&gt;​&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;...&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 01 Jan 2017 13:14:54 GMT</pubDate>
    <dc:creator>Jonathan_Lebowi</dc:creator>
    <dc:date>2017-01-01T13:14:54Z</dc:date>
    <item>
      <title>MS Powershell Scripts for calling Check Point API</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/MS-Powershell-Scripts-for-calling-Check-Point-API/m-p/38883#M2362</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;H2&gt;Overview&lt;/H2&gt;&lt;P&gt;The 3 scripts that are made available here are:&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/jlebowitsch/powershellscripts/blob/master/CPAPI-Authenticate.ps1" title="CPAPI-Authenticate.ps1"&gt;&lt;SPAN style="font-size: 10.5pt; font-family: 'Segoe UI','sans-serif'; color: #4078c0; background: whitesmoke;"&gt;CPAPI-Authenticate.ps1&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.5pt; font-family: 'Segoe UI','sans-serif'; color: #4078c0; background: whitesmoke;"&gt;&lt;A href="https://github.com/jlebowitsch/powershellscripts/blob/master/CPAPI-Show-Hosts.ps1"&gt;CPAPI-Show-Hosts.ps1&lt;/A&gt;​&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/jlebowitsch/powershellscripts/blob/master/CPAPI-Add-Host.ps1" title="CPAPI-Add-Host.ps1"&gt;&lt;SPAN style="font-size: 10.5pt; font-family: 'Segoe UI','sans-serif'; color: #4078c0; background: whitesmoke;"&gt;CPAPI-Add-Host.ps1&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;They are meant to serve as proof of concept for building a modular library of such scripts, with an eye towards creating a Powershell module that will allow users to manage Check Point deployments from Microsoft Powershell, in a fashion similar to the Azure and AWS modules.&lt;/P&gt;&lt;P&gt;CPAPI-Authentiate.ps1 is a self-standing script for authenticating users and getting from the management server the security id that allows users to authenticate when using the API. The other scripts each hit a different API, and use the token and server objects created by the Authentication script, in the construction of the requests they create. The 2 scripts invoke the authentication script if they fail to find valid objects.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H2&gt;Description&lt;/H2&gt;&lt;P&gt;See &lt;A href="https://github.com/jlebowitsch/powershellscripts/blob/master/Powershell%20Scripts%20using%20Check%20Point%20API%20PoC%20intro.pdf"&gt;this doc&lt;/A&gt; and the help sections of the script&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H2&gt;Instructions&lt;/H2&gt;&lt;P&gt;Download the three CPAPI-xxx.ps1 scripts from &lt;A href="https://github.com/jlebowitsch/powershellscripts"&gt; here&lt;/A&gt; to some one folder on your machine (They all need to be on the same folder).&lt;/P&gt;&lt;P&gt;Use Powershell ISE (preferred) or Powershell to execute the scripts thus:.\CPAPI-Authenticate.ps1&lt;/P&gt;&lt;P&gt;Use get-help .\CPAPI-Authenticate.ps1 to see some help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H2&gt;Code Version&lt;/H2&gt;&lt;P&gt;Code version 0.0.1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H2&gt;Tested on version&lt;/H2&gt;&lt;P&gt;R80, API version 1.0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="font-size: 13px; color: #ff0000;"&gt;&lt;STRONG&gt;NOTICE: &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.6667px; color: #999999;"&gt;&lt;STRONG&gt;By using this sample code you agree to terms and conditions in this &lt;A href="https://community.checkpoint.com/docs/DOC-1042"&gt;Not authorized to view the specified document 1042&lt;/A&gt;​&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;...&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 01 Jan 2017 13:14:54 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/MS-Powershell-Scripts-for-calling-Check-Point-API/m-p/38883#M2362</guid>
      <dc:creator>Jonathan_Lebowi</dc:creator>
      <dc:date>2017-01-01T13:14:54Z</dc:date>
    </item>
  </channel>
</rss>

