The 3 scripts that are made available here are:
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.
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.
See this doc and the help sections of the script
Download the three CPAPI-xxx.ps1 scripts from here to some one folder on your machine (They all need to be on the same folder).
Use Powershell ISE (preferred) or Powershell to execute the scripts thus:.\CPAPI-Authenticate.ps1
Use get-help .\CPAPI-Authenticate.ps1 to see some help
Code version 0.0.1
Tested on version
R80, API version 1.0
NOTICE: By using this sample code you agree to terms and conditions in this Terms and Conditions