<?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 Policy install script in Scripts</title>
    <link>https://community.checkpoint.com/t5/Scripts/Policy-install-script/m-p/271474#M1499</link>
    <description>&lt;P&gt;Hey guys,&lt;/P&gt;
&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;My lab example:&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;[Expert@CP-MANAGEMENT:0]# cd /var/log/scripts/&lt;BR /&gt;[Expert@CP-MANAGEMENT:0]# chmod 777 *&lt;BR /&gt;[Expert@CP-MANAGEMENT:0]# dos2unix *&lt;BR /&gt;dos2unix: converting file cp_install_policy.sh to Unix format ...&lt;BR /&gt;[Expert@CP-MANAGEMENT:0]# ./cp_install_policy.sh&lt;BR /&gt;ERROR: --package is required unless using --list&lt;BR /&gt;Usage:&lt;BR /&gt;cp_install_policy.sh -p "PolicyPackage" [-t "gw1" [-t "gw2"...]] [options]&lt;/P&gt;
&lt;P&gt;Options:&lt;BR /&gt;-p, --package Policy package name (required)&lt;BR /&gt;-t, --target Gateway/cluster object name or UID (repeatable)&lt;BR /&gt;-l, --list List gateways and exit&lt;BR /&gt;-i, --interactive Pick target(s) interactively (simple menu)&lt;BR /&gt;--domain NAME MDS only: domain name to login to (optional)&lt;BR /&gt;--access [true|false] Install Access policy (default: true)&lt;BR /&gt;--threat-prevention [true|false] Install Threat Prevention policy (default: false)&lt;BR /&gt;--qos [true|false] Install QoS policy (default: false)&lt;BR /&gt;--wait Wait for install task completion (default: true)&lt;BR /&gt;--no-wait Do not wait for task completion&lt;BR /&gt;--format [json|text] Output format (default: json)&lt;BR /&gt;-h, --help Show help&lt;/P&gt;
&lt;P&gt;Authentication:&lt;BR /&gt;Script will prompt for Management API username &amp;amp; password (password not echoed).&lt;/P&gt;
&lt;P&gt;Examples:&lt;BR /&gt;# List gateways:&lt;BR /&gt;./cp_install_policy.sh --list&lt;/P&gt;
&lt;P&gt;# Install package "Standard" on gateway "corp-gw01" and wait for completion:&lt;BR /&gt;./cp_install_policy.sh -p "Standard" -t "corp-gw01" --threat-prevention true --wait&lt;/P&gt;
&lt;P&gt;# Interactive target selection:&lt;BR /&gt;./cp_install_policy.sh -p "Standard" --interactive&lt;/P&gt;
&lt;P&gt;Notes:&lt;BR /&gt;Always specify explicit targets to prevent unintended installs. [7](&lt;A href="https://community.checkpoint.com/t5/Management/Scheduled-policy-install/m-p/242443)[8](https://community.checkpoint.com/t5/API-CLI-Discussion/API-Policy-Install/td-p/163658" target="_blank"&gt;https://community.checkpoint.com/t5/Management/Scheduled-policy-install/m-p/242443)[8](https://community.checkpoint.com/t5/API-CLI-Discussion/API-Policy-Install/td-p/163658&lt;/A&gt;)&lt;BR /&gt;[Expert@CP-MANAGEMENT:0]#&lt;BR /&gt;[Expert@CP-MANAGEMENT:0]# ./cp_install_policy.sh -p LAB-POLICY-Andy -t CP-FW-CLUSTER&lt;BR /&gt;Management API Username: admin&lt;BR /&gt;Management API Password:&lt;BR /&gt;Installing policy package 'LAB-POLICY-Andy' on target(s): CP-FW-CLUSTER&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;---------------------------------------------&lt;BR /&gt;Time: [09:26:03] 20/2/2026&lt;BR /&gt;---------------------------------------------&lt;BR /&gt;"Policy installation - LAB-POLICY-Andy" in progress (0%)&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;---------------------------------------------&lt;BR /&gt;Time: [09:26:13] 20/2/2026&lt;BR /&gt;---------------------------------------------&lt;BR /&gt;"Policy installation - LAB-POLICY-Andy" in progress (50%)&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;---------------------------------------------&lt;BR /&gt;Time: [09:26:23] 20/2/2026&lt;BR /&gt;---------------------------------------------&lt;BR /&gt;"Policy installation - LAB-POLICY-Andy" in progress (50%)&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;---------------------------------------------&lt;BR /&gt;Time: [09:26:33] 20/2/2026&lt;BR /&gt;---------------------------------------------&lt;BR /&gt;"Policy installation - LAB-POLICY-Andy" in progress (50%)&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;---------------------------------------------&lt;BR /&gt;Time: [09:26:43] 20/2/2026&lt;BR /&gt;---------------------------------------------&lt;BR /&gt;"Policy installation - LAB-POLICY-Andy" succeeded (100%)&lt;BR /&gt;{&lt;BR /&gt;"tasks": [&lt;BR /&gt;{&lt;BR /&gt;"uid": "7857c32a-932f-4557-bd12-2af5bda08c0f",&lt;BR /&gt;"type": "task",&lt;BR /&gt;"domain": {&lt;BR /&gt;"uid": "41e821a0-3720-11e3-aa6e-0800200c9fde",&lt;BR /&gt;"name": "SMC User",&lt;BR /&gt;"domain-type": "domain"&lt;BR /&gt;},&lt;BR /&gt;"task-id": "f9753a10-cd7f-417b-a001-148bb2fe8a95",&lt;BR /&gt;"task-name": "Policy installation - LAB-POLICY-Andy",&lt;BR /&gt;"status": "succeeded",&lt;BR /&gt;"progress-percentage": 100,&lt;BR /&gt;"start-time": {&lt;BR /&gt;"posix": 1771597562188,&lt;BR /&gt;"iso-8601": "2026-02-20T09:26-0500"&lt;BR /&gt;},&lt;BR /&gt;"last-update-time": {&lt;BR /&gt;"posix": 1771597598786,&lt;BR /&gt;"iso-8601": "2026-02-20T09:26-0500"&lt;BR /&gt;},&lt;BR /&gt;"suppressed": false,&lt;BR /&gt;"task-details": [&lt;BR /&gt;{&lt;BR /&gt;"uid": "6b9180b9-2be9-49e8-8ee6-9bacba70bb70",&lt;BR /&gt;"domain": {&lt;BR /&gt;"uid": "41e821a0-3720-11e3-aa6e-0800200c9fde",&lt;BR /&gt;"name": "SMC User",&lt;BR /&gt;"domain-type": "domain"&lt;BR /&gt;},&lt;BR /&gt;"color": "black",&lt;BR /&gt;"statusCode": "succeeded",&lt;BR /&gt;"statusDescription": "Succeeded",&lt;BR /&gt;"taskNotification": "7857c32a-932f-4557-bd12-2af5bda08c0f",&lt;BR /&gt;"gatewayId": "1d825439-7eff-42ff-bee2-f091dad7aa83",&lt;BR /&gt;"clusterGroupId": "1d825439-7eff-42ff-bee2-f091dad7aa83",&lt;BR /&gt;"policyId": "cbd3406d-006e-4006-9206-e3660aab7fda",&lt;BR /&gt;"fastInstallStatus": {&lt;BR /&gt;"worksessionId": "b0e4129b-bd2d-471d-afac-9a84d17e187e",&lt;BR /&gt;"gatewayId": "1d825439-7eff-42ff-bee2-f091dad7aa83",&lt;BR /&gt;"policyId": "cbd3406d-006e-4006-9206-e3660aab7fda",&lt;BR /&gt;"status": "local_changes",&lt;BR /&gt;"detailedReason": []&lt;BR /&gt;},&lt;BR /&gt;"runningStages": [],&lt;BR /&gt;"waitingStages": [],&lt;BR /&gt;"stagesInfo": [],&lt;BR /&gt;"cluster": true,&lt;BR /&gt;"meta-info": {&lt;BR /&gt;"validation-state": "ok",&lt;BR /&gt;"last-modify-time": {&lt;BR /&gt;"posix": 1771597598000,&lt;BR /&gt;"iso-8601": "2026-02-20T09:26-0500"&lt;BR /&gt;},&lt;BR /&gt;"last-modifier": "System",&lt;BR /&gt;"creation-time": {&lt;BR /&gt;"posix": 1771597562599,&lt;BR /&gt;"iso-8601": "2026-02-20T09:26-0500"&lt;BR /&gt;},&lt;BR /&gt;"creator": "System"&lt;BR /&gt;},&lt;BR /&gt;"tags": [],&lt;BR /&gt;"icon": "General/globalsNa",&lt;BR /&gt;"comments": "",&lt;BR /&gt;"display-name": "",&lt;BR /&gt;"gatewayName": "CP-FW-CLUSTER",&lt;BR /&gt;"revision": "b0e4129b-bd2d-471d-afac-9a84d17e187e"&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"uid": "d6bf4015-3d1a-46db-ba32-63aac59bd3a8",&lt;BR /&gt;"domain": {&lt;BR /&gt;"uid": "41e821a0-3720-11e3-aa6e-0800200c9fde",&lt;BR /&gt;"name": "SMC User",&lt;BR /&gt;"domain-type": "domain"&lt;BR /&gt;},&lt;BR /&gt;"color": "black",&lt;BR /&gt;"statusCode": "succeeded",&lt;BR /&gt;"statusDescription": "Succeeded",&lt;BR /&gt;"taskNotification": "7857c32a-932f-4557-bd12-2af5bda08c0f",&lt;BR /&gt;"gatewayId": "c2fdd6b1-e28a-4fff-bc41-f54aa31cf4f7",&lt;BR /&gt;"clusterGroupId": "1d825439-7eff-42ff-bee2-f091dad7aa83",&lt;BR /&gt;"policyId": "cbd3406d-006e-4006-9206-e3660aab7fda",&lt;BR /&gt;"fastInstallStatus": {&lt;BR /&gt;"worksessionId": "b0e4129b-bd2d-471d-afac-9a84d17e187e",&lt;BR /&gt;"gatewayId": "1d825439-7eff-42ff-bee2-f091dad7aa83",&lt;BR /&gt;"policyId": "cbd3406d-006e-4006-9206-e3660aab7fda",&lt;BR /&gt;"status": "local_changes",&lt;BR /&gt;"detailedReason": []&lt;BR /&gt;},&lt;BR /&gt;"runningStages": [],&lt;BR /&gt;"waitingStages": [],&lt;BR /&gt;"stagesInfo": [],&lt;BR /&gt;"cluster": false,&lt;BR /&gt;"meta-info": {&lt;BR /&gt;"validation-state": "ok",&lt;BR /&gt;"last-modify-time": {&lt;BR /&gt;"posix": 1771597597992,&lt;BR /&gt;"iso-8601": "2026-02-20T09:26-0500"&lt;BR /&gt;},&lt;BR /&gt;"last-modifier": "System",&lt;BR /&gt;"creation-time": {&lt;BR /&gt;"posix": 1771597562494,&lt;BR /&gt;"iso-8601": "2026-02-20T09:26-0500"&lt;BR /&gt;},&lt;BR /&gt;"creator": "System"&lt;BR /&gt;},&lt;BR /&gt;"tags": [],&lt;BR /&gt;"icon": "General/globalsNa",&lt;BR /&gt;"comments": "",&lt;BR /&gt;"display-name": "",&lt;BR /&gt;"gatewayName": "CP-FW-02",&lt;BR /&gt;"revision": "b0e4129b-bd2d-471d-afac-9a84d17e187e"&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"uid": "b97d7f3e-d0c6-48b1-b1c8-37c7799127a4",&lt;BR /&gt;"domain": {&lt;BR /&gt;"uid": "41e821a0-3720-11e3-aa6e-0800200c9fde",&lt;BR /&gt;"name": "SMC User",&lt;BR /&gt;"domain-type": "domain"&lt;BR /&gt;},&lt;BR /&gt;"color": "black",&lt;BR /&gt;"statusCode": "succeeded",&lt;BR /&gt;"statusDescription": "Succeeded",&lt;BR /&gt;"taskNotification": "7857c32a-932f-4557-bd12-2af5bda08c0f",&lt;BR /&gt;"gatewayId": "65dc39dc-5c46-4b3a-9938-2fc869cb94df",&lt;BR /&gt;"clusterGroupId": "1d825439-7eff-42ff-bee2-f091dad7aa83",&lt;BR /&gt;"policyId": "cbd3406d-006e-4006-9206-e3660aab7fda",&lt;BR /&gt;"fastInstallStatus": {&lt;BR /&gt;"worksessionId": "b0e4129b-bd2d-471d-afac-9a84d17e187e",&lt;BR /&gt;"gatewayId": "1d825439-7eff-42ff-bee2-f091dad7aa83",&lt;BR /&gt;"policyId": "cbd3406d-006e-4006-9206-e3660aab7fda",&lt;BR /&gt;"status": "local_changes",&lt;BR /&gt;"detailedReason": []&lt;BR /&gt;},&lt;BR /&gt;"runningStages": [],&lt;BR /&gt;"waitingStages": [],&lt;BR /&gt;"cluster": false,&lt;BR /&gt;"meta-info": {&lt;BR /&gt;"validation-state": "ok",&lt;BR /&gt;"last-modify-time": {&lt;BR /&gt;"posix": 1771597597983,&lt;BR /&gt;"iso-8601": "2026-02-20T09:26-0500"&lt;BR /&gt;},&lt;BR /&gt;"last-modifier": "System",&lt;BR /&gt;"creation-time": {&lt;BR /&gt;"posix": 1771597562556,&lt;BR /&gt;"iso-8601": "2026-02-20T09:26-0500"&lt;BR /&gt;},&lt;BR /&gt;"creator": "System"&lt;BR /&gt;},&lt;BR /&gt;"tags": [],&lt;BR /&gt;"icon": "General/globalsNa",&lt;BR /&gt;"comments": "",&lt;BR /&gt;"display-name": "",&lt;BR /&gt;"gatewayName": "CP-FW-01",&lt;BR /&gt;"revision": "b0e4129b-bd2d-471d-afac-9a84d17e187e"&lt;BR /&gt;}&lt;BR /&gt;],&lt;BR /&gt;"comments": "Installation succeeded on CP-FW-CLUSTER",&lt;BR /&gt;"color": "black",&lt;BR /&gt;"icon": "General/globalsNa",&lt;BR /&gt;"tags": [],&lt;BR /&gt;"meta-info": {&lt;BR /&gt;"lock": "unlocked",&lt;BR /&gt;"validation-state": "ok",&lt;BR /&gt;"last-modify-time": {&lt;BR /&gt;"posix": 1771597598792,&lt;BR /&gt;"iso-8601": "2026-02-20T09:26-0500"&lt;BR /&gt;},&lt;BR /&gt;"last-modifier": "System",&lt;BR /&gt;"creation-time": {&lt;BR /&gt;"posix": 1771597562193,&lt;BR /&gt;"iso-8601": "2026-02-20T09:26-0500"&lt;BR /&gt;},&lt;BR /&gt;"creator": "System"&lt;BR /&gt;},&lt;BR /&gt;"read-only": false,&lt;BR /&gt;"available-actions": {&lt;BR /&gt;"edit": "true",&lt;BR /&gt;"delete": "true",&lt;BR /&gt;"clone": "false"&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}&lt;BR /&gt;No task-id found in response. Exiting.&lt;BR /&gt;[Expert@CP-MANAGEMENT:0]#&lt;/P&gt;</description>
    <pubDate>Wed, 05 Aug 2026 17:30:25 GMT</pubDate>
    <dc:creator>the_rock</dc:creator>
    <dc:date>2026-08-05T17:30:25Z</dc:date>
    <item>
      <title>Policy install script</title>
      <link>https://community.checkpoint.com/t5/Scripts/Policy-install-script/m-p/271474#M1499</link>
      <description>4</description>
      <pubDate>Wed, 05 Aug 2026 17:30:25 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Scripts/Policy-install-script/m-p/271474#M1499</guid>
      <dc:creator>the_rock</dc:creator>
      <dc:date>2026-08-05T17:30:25Z</dc:date>
    </item>
  </channel>
</rss>

