Hello All,
I have been working with the Powershell module for Checkpoint (psCheckPoint) I have the following code configured so far:
$Session = Open-CheckPointSession -ManagementServer <ServerNameHere> -Credentials (Get-Credential) -SessionTimeout 3600 -SessionComments "Testing API additions"
Import-Csv D:\temp\FirewallHosts.csv -OutVariable Hosts
New-CheckPointGroup -Name "GroupNameHere" -Comments "GroupCommentsHere" -Session $Session
Foreach ($newHost in $Hosts){
$name = $newHost.name
$ip = $newHost.Ip
New-CheckPointHost -IPv4Address $ip -Name $name -Comments "HostCommentsHere" -Session $Session
}
Set-CheckPointGroup -Group "GroupNameHere" -Members $MHosts
Publish-CheckPointSession -Session $Session -Verbose
Install-CheckPointPolicy -PolicyPackage <FirewallPolicyName> -Access -Verbose -Session $Session
Everything works except for the publish and then the install. I do not get any response from the publish however when I run the install I get the following error:
Install-CheckPointPolicy: Runtime error: This operation cannot be done when unpublished changes are present. The current session contains 1 unpublished changes.
I do have a cluster of firewalls and I don't think that should make a difference but it might. Anyway and help on this would be fantastic.
Thanks,
Scott