- Products
- Learn
- Local User Groups
- Partners
- More
The Great Exposure Reset
24 February 2026 @ 5pm CET / 11am EST
AI Security Masters E4:
Introducing Cyata - Securing the Agenic AI Era
AI Security Masters E3:
AI-Generated Malware
CheckMates Go:
CheckMates Fest
Hey guys,
Wondering if someone is willing to test this script, it essentially does same thing as mgmt_cli install policy command, but it does let you choose package and also gateway you wish to install it to.
My lab example:
[Expert@CP-MANAGEMENT:0]# cd /var/log/scripts/
[Expert@CP-MANAGEMENT:0]# chmod 777 *
[Expert@CP-MANAGEMENT:0]# dos2unix *
dos2unix: converting file cp_install_policy.sh to Unix format ...
[Expert@CP-MANAGEMENT:0]# ./cp_install_policy.sh
ERROR: --package is required unless using --list
Usage:
cp_install_policy.sh -p "PolicyPackage" [-t "gw1" [-t "gw2"...]] [options]
Options:
-p, --package Policy package name (required)
-t, --target Gateway/cluster object name or UID (repeatable)
-l, --list List gateways and exit
-i, --interactive Pick target(s) interactively (simple menu)
--domain NAME MDS only: domain name to login to (optional)
--access [true|false] Install Access policy (default: true)
--threat-prevention [true|false] Install Threat Prevention policy (default: false)
--qos [true|false] Install QoS policy (default: false)
--wait Wait for install task completion (default: true)
--no-wait Do not wait for task completion
--format [json|text] Output format (default: json)
-h, --help Show help
Authentication:
Script will prompt for Management API username & password (password not echoed).
Examples:
# List gateways:
./cp_install_policy.sh --list
# Install package "Standard" on gateway "corp-gw01" and wait for completion:
./cp_install_policy.sh -p "Standard" -t "corp-gw01" --threat-prevention true --wait
# Interactive target selection:
./cp_install_policy.sh -p "Standard" --interactive
Notes:
Always specify explicit targets to prevent unintended installs. [7](https://community.checkpoint.com/t5/Management/Scheduled-policy-install/m-p/242443)[8](https://commu...)
[Expert@CP-MANAGEMENT:0]#
[Expert@CP-MANAGEMENT:0]# ./cp_install_policy.sh -p LAB-POLICY-Andy -t CP-FW-CLUSTER
Management API Username: admin
Management API Password:
Installing policy package 'LAB-POLICY-Andy' on target(s): CP-FW-CLUSTER
---------------------------------------------
Time: [09:26:03] 20/2/2026
---------------------------------------------
"Policy installation - LAB-POLICY-Andy" in progress (0%)
---------------------------------------------
Time: [09:26:13] 20/2/2026
---------------------------------------------
"Policy installation - LAB-POLICY-Andy" in progress (50%)
---------------------------------------------
Time: [09:26:23] 20/2/2026
---------------------------------------------
"Policy installation - LAB-POLICY-Andy" in progress (50%)
---------------------------------------------
Time: [09:26:33] 20/2/2026
---------------------------------------------
"Policy installation - LAB-POLICY-Andy" in progress (50%)
---------------------------------------------
Time: [09:26:43] 20/2/2026
---------------------------------------------
"Policy installation - LAB-POLICY-Andy" succeeded (100%)
{
"tasks": [
{
"uid": "7857c32a-932f-4557-bd12-2af5bda08c0f",
"type": "task",
"domain": {
"uid": "41e821a0-3720-11e3-aa6e-0800200c9fde",
"name": "SMC User",
"domain-type": "domain"
},
"task-id": "f9753a10-cd7f-417b-a001-148bb2fe8a95",
"task-name": "Policy installation - LAB-POLICY-Andy",
"status": "succeeded",
"progress-percentage": 100,
"start-time": {
"posix": 1771597562188,
"iso-8601": "2026-02-20T09:26-0500"
},
"last-update-time": {
"posix": 1771597598786,
"iso-8601": "2026-02-20T09:26-0500"
},
"suppressed": false,
"task-details": [
{
"uid": "6b9180b9-2be9-49e8-8ee6-9bacba70bb70",
"domain": {
"uid": "41e821a0-3720-11e3-aa6e-0800200c9fde",
"name": "SMC User",
"domain-type": "domain"
},
"color": "black",
"statusCode": "succeeded",
"statusDescription": "Succeeded",
"taskNotification": "7857c32a-932f-4557-bd12-2af5bda08c0f",
"gatewayId": "1d825439-7eff-42ff-bee2-f091dad7aa83",
"clusterGroupId": "1d825439-7eff-42ff-bee2-f091dad7aa83",
"policyId": "cbd3406d-006e-4006-9206-e3660aab7fda",
"fastInstallStatus": {
"worksessionId": "b0e4129b-bd2d-471d-afac-9a84d17e187e",
"gatewayId": "1d825439-7eff-42ff-bee2-f091dad7aa83",
"policyId": "cbd3406d-006e-4006-9206-e3660aab7fda",
"status": "local_changes",
"detailedReason": []
},
"runningStages": [],
"waitingStages": [],
"stagesInfo": [],
"cluster": true,
"meta-info": {
"validation-state": "ok",
"last-modify-time": {
"posix": 1771597598000,
"iso-8601": "2026-02-20T09:26-0500"
},
"last-modifier": "System",
"creation-time": {
"posix": 1771597562599,
"iso-8601": "2026-02-20T09:26-0500"
},
"creator": "System"
},
"tags": [],
"icon": "General/globalsNa",
"comments": "",
"display-name": "",
"gatewayName": "CP-FW-CLUSTER",
"revision": "b0e4129b-bd2d-471d-afac-9a84d17e187e"
},
{
"uid": "d6bf4015-3d1a-46db-ba32-63aac59bd3a8",
"domain": {
"uid": "41e821a0-3720-11e3-aa6e-0800200c9fde",
"name": "SMC User",
"domain-type": "domain"
},
"color": "black",
"statusCode": "succeeded",
"statusDescription": "Succeeded",
"taskNotification": "7857c32a-932f-4557-bd12-2af5bda08c0f",
"gatewayId": "c2fdd6b1-e28a-4fff-bc41-f54aa31cf4f7",
"clusterGroupId": "1d825439-7eff-42ff-bee2-f091dad7aa83",
"policyId": "cbd3406d-006e-4006-9206-e3660aab7fda",
"fastInstallStatus": {
"worksessionId": "b0e4129b-bd2d-471d-afac-9a84d17e187e",
"gatewayId": "1d825439-7eff-42ff-bee2-f091dad7aa83",
"policyId": "cbd3406d-006e-4006-9206-e3660aab7fda",
"status": "local_changes",
"detailedReason": []
},
"runningStages": [],
"waitingStages": [],
"stagesInfo": [],
"cluster": false,
"meta-info": {
"validation-state": "ok",
"last-modify-time": {
"posix": 1771597597992,
"iso-8601": "2026-02-20T09:26-0500"
},
"last-modifier": "System",
"creation-time": {
"posix": 1771597562494,
"iso-8601": "2026-02-20T09:26-0500"
},
"creator": "System"
},
"tags": [],
"icon": "General/globalsNa",
"comments": "",
"display-name": "",
"gatewayName": "CP-FW-02",
"revision": "b0e4129b-bd2d-471d-afac-9a84d17e187e"
},
{
"uid": "b97d7f3e-d0c6-48b1-b1c8-37c7799127a4",
"domain": {
"uid": "41e821a0-3720-11e3-aa6e-0800200c9fde",
"name": "SMC User",
"domain-type": "domain"
},
"color": "black",
"statusCode": "succeeded",
"statusDescription": "Succeeded",
"taskNotification": "7857c32a-932f-4557-bd12-2af5bda08c0f",
"gatewayId": "65dc39dc-5c46-4b3a-9938-2fc869cb94df",
"clusterGroupId": "1d825439-7eff-42ff-bee2-f091dad7aa83",
"policyId": "cbd3406d-006e-4006-9206-e3660aab7fda",
"fastInstallStatus": {
"worksessionId": "b0e4129b-bd2d-471d-afac-9a84d17e187e",
"gatewayId": "1d825439-7eff-42ff-bee2-f091dad7aa83",
"policyId": "cbd3406d-006e-4006-9206-e3660aab7fda",
"status": "local_changes",
"detailedReason": []
},
"runningStages": [],
"waitingStages": [],
"cluster": false,
"meta-info": {
"validation-state": "ok",
"last-modify-time": {
"posix": 1771597597983,
"iso-8601": "2026-02-20T09:26-0500"
},
"last-modifier": "System",
"creation-time": {
"posix": 1771597562556,
"iso-8601": "2026-02-20T09:26-0500"
},
"creator": "System"
},
"tags": [],
"icon": "General/globalsNa",
"comments": "",
"display-name": "",
"gatewayName": "CP-FW-01",
"revision": "b0e4129b-bd2d-471d-afac-9a84d17e187e"
}
],
"comments": "Installation succeeded on CP-FW-CLUSTER",
"color": "black",
"icon": "General/globalsNa",
"tags": [],
"meta-info": {
"lock": "unlocked",
"validation-state": "ok",
"last-modify-time": {
"posix": 1771597598792,
"iso-8601": "2026-02-20T09:26-0500"
},
"last-modifier": "System",
"creation-time": {
"posix": 1771597562193,
"iso-8601": "2026-02-20T09:26-0500"
},
"creator": "System"
},
"read-only": false,
"available-actions": {
"edit": "true",
"delete": "true",
"clone": "false"
}
}
]
}
No task-id found in response. Exiting.
[Expert@CP-MANAGEMENT:0]#
Hey guys,
Wondering if someone is willing to test this script, it essentially does same thing as mgmt_cli install policy command, but it does let you choose package and also gateway you wish to install it to.
My lab example:
[Expert@CP-MANAGEMENT:0]# cd /var/log/scripts/
[Expert@CP-MANAGEMENT:0]# chmod 777 *
[Expert@CP-MANAGEMENT:0]# dos2unix *
dos2unix: converting file cp_install_policy.sh to Unix format ...
[Expert@CP-MANAGEMENT:0]# ./cp_install_policy.sh
ERROR: --package is require
About CheckMates
Learn Check Point
Advanced Learning
YOU DESERVE THE BEST SECURITY