- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
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?
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