EPM - Script Distribution Policy appending additional command when executing Powershell scripts

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Endpoint Privilege Manager (EPM) Articles
1 min read
L0 Member
No ratings

Question

When the user attempts to execute a .ps1 on Script Distribution Policy.
EPM will execute the "powershell.exe" while appending the following command to run the script:
-Command if((Get-ExecutionPolicy ) -ne 'AllSigned') { Set-ExecutionPolicy -Scope Process Bypass -Force}; 

Why did EPM Agent execute the script with the above command?

Answer

When the machine's Script Execution policy is set to "AllSigned", PowerShell requires that all scripts (including those deployed by EPM) must be digitally signed by a trusted publisher.
Next, when "AllSigned" is enforced as the script execution policy, PowerShell blocks any unsigned scripts from running — even if its triggered by EPM 

EPM’s Script Distribution Policies are designed to work under standard execution policies (e.g., "Bypass", "RemoteSigned", etc.), which is why EPM is appending the command when executing .ps1 script

Rate this article:
  • 660 Views
  • 0 comments
  • 0 Likes
Article Dashboard
Version history
Last Updated:
‎05-08-2025 08:47 PM
Updated by: