Navigatie

PowerShell, AD computers to Check Point objects

This is my attempt to create a PowerShell script to add all computers in an Active Directory as hosts in a Check Point R80 firewall. It is a work in progress at the moment.It requires at least Check Point R80!
(I tested it only with R80.10)

If you have not done so allready make sure you install the Check Point for PowerShell modules by running this as administrator:

Install-Module psCheckPoint
Install-Module psCheckPointAI

The functions of the module psCheckPoint are documented in the psCheckPoint WIKI
and (as ever) Get-Help is your friend!

Once installed you don’t need administrator rights for the Check Point connection. This script might however need elevated rights to find all machines in Active Directory.

In short this script does:

Import Modules

Get list of AD computer and store names and IP addresses

Open a session to the Smart Center

Create a group for all AD computers

Loop over all AD computers and create a Check Point host object for each of them and add them to the group from the previous step