<?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 How to block specific PowerShell Commands? in Endpoint Privilege Manager (EPM) Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/endpoint-privilege-manager-epm/how-to-block-specific-powershell-commands/m-p/1352829#M3132</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was wondering if there may be a possibility to block specific power shell commands and how would this be done? For instance, we would like to block this command:&lt;/P&gt;&lt;P&gt;Add-LocalGroupMember -Group "Administrators" -Member "username" ?&lt;/P&gt;</description>
    <pubDate>Wed, 12 Mar 2025 13:21:00 GMT</pubDate>
    <dc:creator>Marcus300</dc:creator>
    <dc:date>2025-03-12T13:21:00Z</dc:date>
    <item>
      <title>How to block specific PowerShell Commands?</title>
      <link>https://live.paloaltonetworks.com/t5/endpoint-privilege-manager-epm/how-to-block-specific-powershell-commands/m-p/1352829#M3132</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was wondering if there may be a possibility to block specific power shell commands and how would this be done? For instance, we would like to block this command:&lt;/P&gt;&lt;P&gt;Add-LocalGroupMember -Group "Administrators" -Member "username" ?&lt;/P&gt;</description>
      <pubDate>Wed, 12 Mar 2025 13:21:00 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/endpoint-privilege-manager-epm/how-to-block-specific-powershell-commands/m-p/1352829#M3132</guid>
      <dc:creator>Marcus300</dc:creator>
      <dc:date>2025-03-12T13:21:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to block specific PowerShell Commands?</title>
      <link>https://live.paloaltonetworks.com/t5/endpoint-privilege-manager-epm/how-to-block-specific-powershell-commands/m-p/1352830#M3133</link>
      <description>&lt;P&gt;&lt;B&gt;iI was wondering if there may be a possibility to block specific power shell commands and how would this be done? For instance, we would like to block this command in cyberark epm - Add-LocalGroupMember -Group "Administrators" -Member "username" ?&lt;/B&gt;&lt;/P&gt;&lt;P&gt;Yes, you can block specific PowerShell commands like&amp;nbsp;&lt;/P&gt;&lt;P&gt;Add-LocalGroupMember&lt;/P&gt;&lt;P&gt;&amp;nbsp;using CyberArk Endpoint Privilege Manager (EPM). This is particularly useful for preventing users from adding themselves or others to the Administrators group.&lt;/P&gt;&lt;P&gt;Here's how you can implement this:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Create an advanced policy to block the specific PowerShell command:&lt;/LI&gt;&lt;/OL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI&gt;In the EPM management console, go to Policies&lt;/LI&gt;&lt;LI&gt;Click "Create advanced policy"&lt;/LI&gt;&lt;LI&gt;Select "Windows" as the platform and "Block" as the action&lt;/LI&gt;&lt;LI&gt;Give your policy a name like "Block Add-LocalGroupMember Command"&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;OL&gt;&lt;LI&gt;Define the application scope:&lt;/LI&gt;&lt;/OL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI&gt;Under Scope, click "Add definition"&lt;/LI&gt;&lt;LI&gt;Set Definition type to "Executable"&lt;/LI&gt;&lt;/UL&gt;&lt;LI&gt;Add the following properties:&lt;UL&gt;&lt;UL&gt;&lt;LI&gt;Original filename: "powershell.exe"&lt;/LI&gt;&lt;LI&gt;Parameters: contains "Add-LocalGroupMember" (make sure case sensitive is NOT selected)&lt;/LI&gt;&lt;/UL&gt;&lt;LI&gt;You can also add additional parameters like "-Group "Administrators"" to be more specific&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;OL&gt;&lt;LI&gt;Set the policy targets:&lt;/LI&gt;&lt;/OL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI&gt;Under Targets, define which computers, users, and groups this policy will apply to&lt;/LI&gt;&lt;LI&gt;You can target all computers or specific AD computer groups&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;This approach aligns with CyberArk's security best practices for protecting against LOLBAS (Living Off The Land Binaries And Scripts) attacks, as described in the&amp;nbsp;&lt;A alt="https://docs.cyberark.com/epm/latest/en/content/security/secureendpoints.htm#SecureendpointswithEPMpolicies" href="https://docs.cyberark.com/epm/latest/en/content/security/secureendpoints.htm#SecureendpointswithEPMpolicies" target="_blank"&gt;&lt;B&gt;Secure endpoints with EPM policies&lt;/B&gt;&lt;/A&gt;&amp;nbsp;documentation.&lt;/P&gt;&lt;P&gt;For additional protection, you might also want to consider:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Implementing the "Remove local administrators" policy to enforce least privilege principles&lt;/LI&gt;&lt;LI&gt;Using "Protect Administrative User Groups" setting to prevent elevated applications from modifying administrative user groups&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;This multi-layered approach will provide comprehensive protection against unauthorized privilege escalation attempts.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Mar 2025 15:45:07 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/endpoint-privilege-manager-epm/how-to-block-specific-powershell-commands/m-p/1352830#M3133</guid>
      <dc:creator>CyberArkAlumni</dc:creator>
      <dc:date>2025-03-12T15:45:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to block specific PowerShell Commands?</title>
      <link>https://live.paloaltonetworks.com/t5/endpoint-privilege-manager-epm/how-to-block-specific-powershell-commands/m-p/1352831#M3134</link>
      <description>&lt;P&gt;&lt;B&gt;iI was wondering if there may be a possibility to block specific power shell commands and how would this be done? For instance, we would like to block this command in cyberark epm - Add-LocalGroupMember -Group "Administrators" -Member "username" ?&lt;/B&gt;&lt;/P&gt;&lt;P&gt;Yes, you can block specific PowerShell commands like&amp;nbsp;&lt;/P&gt;&lt;P&gt;Add-LocalGroupMember&lt;/P&gt;&lt;P&gt;&amp;nbsp;using CyberArk Endpoint Privilege Manager (EPM). This is particularly useful for preventing users from adding themselves or others to the Administrators group.&lt;/P&gt;&lt;P&gt;Here's how you can implement this:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Create an advanced policy to block the specific PowerShell command:&lt;/LI&gt;&lt;/OL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI&gt;In the EPM management console, go to Policies&lt;/LI&gt;&lt;LI&gt;Click "Create advanced policy"&lt;/LI&gt;&lt;LI&gt;Select "Windows" as the platform and "Block" as the action&lt;/LI&gt;&lt;LI&gt;Give your policy a name like "Block Add-LocalGroupMember Command"&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;OL&gt;&lt;LI&gt;Define the application scope:&lt;/LI&gt;&lt;/OL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI&gt;Under Scope, click "Add definition"&lt;/LI&gt;&lt;LI&gt;Set Definition type to "Executable"&lt;/LI&gt;&lt;/UL&gt;&lt;LI&gt;Add the following properties:&lt;UL&gt;&lt;UL&gt;&lt;LI&gt;Original filename: "powershell.exe"&lt;/LI&gt;&lt;LI&gt;Parameters: contains "Add-LocalGroupMember" (make sure case sensitive is NOT selected)&lt;/LI&gt;&lt;/UL&gt;&lt;LI&gt;You can also add additional parameters like "-Group "Administrators"" to be more specific&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;OL&gt;&lt;LI&gt;Set the policy targets:&lt;/LI&gt;&lt;/OL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI&gt;Under Targets, define which computers, users, and groups this policy will apply to&lt;/LI&gt;&lt;LI&gt;You can target all computers or specific AD computer groups&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;This approach aligns with CyberArk's security best practices for protecting against LOLBAS (Living Off The Land Binaries And Scripts) attacks, as described in the&amp;nbsp;&lt;A alt="https://docs.cyberark.com/epm/latest/en/content/security/secureendpoints.htm#SecureendpointswithEPMpolicies" href="https://docs.cyberark.com/epm/latest/en/content/security/secureendpoints.htm#SecureendpointswithEPMpolicies" target="_blank"&gt;&lt;B&gt;Secure endpoints with EPM policies&lt;/B&gt;&lt;/A&gt;&amp;nbsp;documentation.&lt;/P&gt;&lt;P&gt;For additional protection, you might also want to consider:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Implementing the "Remove local administrators" policy to enforce least privilege principles&lt;/LI&gt;&lt;LI&gt;Using "Protect Administrative User Groups" setting to prevent elevated applications from modifying administrative user groups&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;This multi-layered approach will provide comprehensive protection against unauthorized privilege escalation attempts.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Mar 2025 15:45:07 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/endpoint-privilege-manager-epm/how-to-block-specific-powershell-commands/m-p/1352831#M3134</guid>
      <dc:creator>CyberArkAlumni</dc:creator>
      <dc:date>2025-03-12T15:45:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to block specific PowerShell Commands?</title>
      <link>https://live.paloaltonetworks.com/t5/endpoint-privilege-manager-epm/how-to-block-specific-powershell-commands/m-p/1352832#M3135</link>
      <description>&lt;P&gt;Hello @Touseef-ur rehman​&amp;nbsp;,&lt;/P&gt;&lt;P&gt;We have tried the same approach, but in this case, the command is not being blocked as expected. We are using the following command:&lt;/P&gt;&lt;P&gt;net localgroup "Administrators" /add "AzureAD\username"&lt;/P&gt;&lt;P&gt;We have included the parameter that contains : net localgroup "Administrators"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 May 2025 12:14:28 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/endpoint-privilege-manager-epm/how-to-block-specific-powershell-commands/m-p/1352832#M3135</guid>
      <dc:creator>RMahalle1</dc:creator>
      <dc:date>2025-05-08T12:14:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to block specific PowerShell Commands?</title>
      <link>https://live.paloaltonetworks.com/t5/endpoint-privilege-manager-epm/how-to-block-specific-powershell-commands/m-p/1352833#M3136</link>
      <description>&lt;P&gt;Hmm I do recall might be related, that there is a registry key that needs to amending to do with the LSASS that then allows epm to inject and handle the admin group, maybe this is why users can add themselves to the group via powershell/cmd -  fix mentioned here - https://community.cyberark.com/s/question/0D7Ht000008iEluKAE/remove-local-administrators-on-windows-not-working?fromEmail=1&amp;amp;s1oid=00D300000000HNg&amp;amp;s1nid=0DB50000000TRHA&amp;amp;s1uid=005Ht00000Ai0zl&amp;amp;s1ext=0&amp;amp;emkind=chatterBestAnswerNotification&amp;amp;emtm=1722338622637&lt;/P&gt;</description>
      <pubDate>Thu, 08 May 2025 15:36:39 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/endpoint-privilege-manager-epm/how-to-block-specific-powershell-commands/m-p/1352833#M3136</guid>
      <dc:creator>CyberArkAlumni</dc:creator>
      <dc:date>2025-05-08T15:36:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to block specific PowerShell Commands?</title>
      <link>https://live.paloaltonetworks.com/t5/endpoint-privilege-manager-epm/how-to-block-specific-powershell-commands/m-p/1352834#M3137</link>
      <description>&lt;P&gt;Hmm I do recall might be related, that there is a registry key that needs to amending to do with the LSASS that then allows epm to inject and handle the admin group, maybe this is why users can add themselves to the group via powershell/cmd -  fix mentioned here - https://community.cyberark.com/s/question/0D7Ht000008iEluKAE/remove-local-administrators-on-windows-not-working?fromEmail=1&amp;amp;s1oid=00D300000000HNg&amp;amp;s1nid=0DB50000000TRHA&amp;amp;s1uid=005Ht00000Ai0zl&amp;amp;s1ext=0&amp;amp;emkind=chatterBestAnswerNotification&amp;amp;emtm=1722338622637&lt;/P&gt;</description>
      <pubDate>Thu, 08 May 2025 15:36:39 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/endpoint-privilege-manager-epm/how-to-block-specific-powershell-commands/m-p/1352834#M3137</guid>
      <dc:creator>CyberArkAlumni</dc:creator>
      <dc:date>2025-05-08T15:36:39Z</dc:date>
    </item>
  </channel>
</rss>

