<?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 Re: Creating Block policies for scripts in Endpoint Privilege Manager (EPM) Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/endpoint-privilege-manager-epm/creating-block-policies-for-scripts/m-p/1418861#M9005</link>
    <description>&lt;P&gt;This was the primary reason for EPM as it handles admin right based developer machines better with far more granular controls, when we started moving dev's to EPM we realised many QA's were not code signing their apps(which is actually a bad practice)  so they were being rightly so blocked by EPM, the solution was for our solution team to instruct the many teams on how to code sign their apps where possible outside of some old legacy apps we simply had to create a policy for but this one only a one off here and there, so we created various code signed policies as shown in the picture below, this meant that bad practice of non signed apps could no longer install on windows devices with EPM running. The solution was to then have a system in place where the PKi team could log a request to cyber to create a new code signed policy if and when required. &lt;span class="lia-inline-image-display-wrapper" image-alt="Field_Content_versions_oct20__068Vy00001hZAxkIAG.png"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/95950i67DED1FAE77E1B28/image-size/large?v=v2&amp;amp;px=999" role="button" title="Field_Content_versions_oct20__068Vy00001hZAxkIAG.png" alt="Field_Content_versions_oct20__068Vy00001hZAxkIAG.png" /&gt;&lt;/span&gt;https://www.paloaltonetworks.com/cyberpedia/what-is-code-signing &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Rather than blocking scripts run in PS or from CMD, including batch files and so on we actually locked down PS, CMD, notepad++ via an AAD group this is pretty easy to do and works and users would have to justify their need to elevate the shells as they act as broker to run anything. This way we could control and give rights to devs who legitimately need to run these elevated. I don't think we ever actually outright blocked .bat or .ps1 and VBS files on developer machines because that's what developers do all day, i guess in your case you have normal users you don't want them to run these file types, so maybe block the applications instead that lets them run them especially with admin rights?  Honestly we personally never ran EPM on non developer devices besides some EUC/cyber and here and there teams. I presume your users are not elevating the applications that run these files. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I guess on another note are the users running cmd and PS from system32 and wow64 and do they have the ability to elevate? &lt;span class="lia-inline-image-display-wrapper" image-alt="068Vy00001haPTKIA2.jpg"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/95952i53AB66E1BF0A5197/image-size/large?v=v2&amp;amp;px=999" role="button" title="068Vy00001haPTKIA2.jpg" alt="068Vy00001haPTKIA2.jpg" /&gt;&lt;/span&gt;There was a previous question - https://community.cyberark.com/s/question/0D5Vy00000fqYu3KAE/how-to-block-specific-powershell-commands &lt;/P&gt;&lt;P&gt;Apologies this isn't really an answer to your question but more on how we did things.  From memory we mostly blocked apps from being installed or running elevated. It would be impossible for us to block but I guess your situation is different with your user base being non-dev? &lt;/P&gt;</description>
    <pubDate>Tue, 04 Aug 2026 13:13:58 GMT</pubDate>
    <dc:creator>CyberArkAlumni</dc:creator>
    <dc:date>2026-08-04T13:13:58Z</dc:date>
    <item>
      <title>Creating Block policies for scripts</title>
      <link>https://live.paloaltonetworks.com/t5/endpoint-privilege-manager-epm/creating-block-policies-for-scripts/m-p/1418860#M9004</link>
      <description>&lt;P&gt;We have a requirement under Cyber Essentials Plus to block users from being able to run scripts - this would include .bat, .cmd, .vbs, .js, and &lt;B&gt;unsigned&lt;/B&gt; PS1 scripts.&lt;/P&gt;&lt;P&gt;I have created policies accordingly in CyberArk EPM to block scripts based on filename, with *.bat (as an example) as the policy definition.&lt;/P&gt;&lt;P&gt;This is where I'm running into problems.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;B&gt;Batch files&lt;/B&gt;&lt;/P&gt;&lt;P&gt;On checking the properties of a batch file on a targeted machine, I am correctly seeing that the file is Blocked under the EPM tab. On double-clicking the file as a standard user, I am then seeing the expected Block dialog on-screen. However, after clicking Close to this dialog, a command prompt window then opens and &lt;B&gt;the batch file runs anyway&lt;/B&gt;. We do not have any policies set to explicitly allow batch files, and the Block policy is at highest priority anyway.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;B&gt;Powershell scripts&lt;/B&gt;&lt;/P&gt;&lt;P&gt;Again on checking the Properties of an unsigned Powershell script, it correctly shows Blocked under the EPM tab. Double-clicking the file results in the expected Block dialog. However if I open &lt;B&gt;Terminal&lt;/B&gt; or &lt;B&gt;Powershell&lt;/B&gt; on the targeted machine (unelevated), navigate to the script, and run it, &lt;B&gt;the script runs &lt;/B&gt;as though the file has not been blocked.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are attempting to use CyberArk to move away from AppLocker since the two tend to clash, but with these two issues presenting themselves, I can't see any way to make this work as we wish. Can anyone offer any solutions or advice?&lt;/P&gt;</description>
      <pubDate>Tue, 04 Aug 2026 12:33:36 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/endpoint-privilege-manager-epm/creating-block-policies-for-scripts/m-p/1418860#M9004</guid>
      <dc:creator>AdamMarks</dc:creator>
      <dc:date>2026-08-04T12:33:36Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Block policies for scripts</title>
      <link>https://live.paloaltonetworks.com/t5/endpoint-privilege-manager-epm/creating-block-policies-for-scripts/m-p/1418861#M9005</link>
      <description>&lt;P&gt;This was the primary reason for EPM as it handles admin right based developer machines better with far more granular controls, when we started moving dev's to EPM we realised many QA's were not code signing their apps(which is actually a bad practice)  so they were being rightly so blocked by EPM, the solution was for our solution team to instruct the many teams on how to code sign their apps where possible outside of some old legacy apps we simply had to create a policy for but this one only a one off here and there, so we created various code signed policies as shown in the picture below, this meant that bad practice of non signed apps could no longer install on windows devices with EPM running. The solution was to then have a system in place where the PKi team could log a request to cyber to create a new code signed policy if and when required. &lt;span class="lia-inline-image-display-wrapper" image-alt="Field_Content_versions_oct20__068Vy00001hZAxkIAG.png"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/95950i67DED1FAE77E1B28/image-size/large?v=v2&amp;amp;px=999" role="button" title="Field_Content_versions_oct20__068Vy00001hZAxkIAG.png" alt="Field_Content_versions_oct20__068Vy00001hZAxkIAG.png" /&gt;&lt;/span&gt;https://www.paloaltonetworks.com/cyberpedia/what-is-code-signing &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Rather than blocking scripts run in PS or from CMD, including batch files and so on we actually locked down PS, CMD, notepad++ via an AAD group this is pretty easy to do and works and users would have to justify their need to elevate the shells as they act as broker to run anything. This way we could control and give rights to devs who legitimately need to run these elevated. I don't think we ever actually outright blocked .bat or .ps1 and VBS files on developer machines because that's what developers do all day, i guess in your case you have normal users you don't want them to run these file types, so maybe block the applications instead that lets them run them especially with admin rights?  Honestly we personally never ran EPM on non developer devices besides some EUC/cyber and here and there teams. I presume your users are not elevating the applications that run these files. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I guess on another note are the users running cmd and PS from system32 and wow64 and do they have the ability to elevate? &lt;span class="lia-inline-image-display-wrapper" image-alt="068Vy00001haPTKIA2.jpg"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/95952i53AB66E1BF0A5197/image-size/large?v=v2&amp;amp;px=999" role="button" title="068Vy00001haPTKIA2.jpg" alt="068Vy00001haPTKIA2.jpg" /&gt;&lt;/span&gt;There was a previous question - https://community.cyberark.com/s/question/0D5Vy00000fqYu3KAE/how-to-block-specific-powershell-commands &lt;/P&gt;&lt;P&gt;Apologies this isn't really an answer to your question but more on how we did things.  From memory we mostly blocked apps from being installed or running elevated. It would be impossible for us to block but I guess your situation is different with your user base being non-dev? &lt;/P&gt;</description>
      <pubDate>Tue, 04 Aug 2026 13:13:58 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/endpoint-privilege-manager-epm/creating-block-policies-for-scripts/m-p/1418861#M9005</guid>
      <dc:creator>CyberArkAlumni</dc:creator>
      <dc:date>2026-08-04T13:13:58Z</dc:date>
    </item>
  </channel>
</rss>

