Error when running PSM Applocker Hardening
Symptom
Launching PSM Applocker Hardening shows the following error:
The term 'PSMConfigureAppLocker.ps1' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:26 + PSMConfigureAppLocker.ps1 <<<< + CategoryInfo : ObjectNotFound: (PSMConfigureAppLocker.ps1:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
OR
File C:\Program Files (x86)\CyberArk\PSM\Hardening\PSMConfigureAppLocker.ps1 cannot be loaded because the execution of scripts is disabled on this system. Please see "get-help about_signing" for more details
Environment
11.1;11.2;11.3;11.4;11.5;11.6;11.7;12.1;12.2;12.6;12.7;13.0 Privileged Access Manager (PAM, self-hosted);Privilege Cloud PSM;Privileged Session Management (PSM) Windows
PSM
Cause
Not enough permissions to execute the command
Resolution
Run the following command prior the Hardening script, via Powershell:
Set-ExecutionPolicy -Force -ExecutionPolicy remotesigned
Additional Information
Details
SYMPTOM:
Launching PSM Applocker Hardening shows the following error:
The term 'PSMConfigureAppLocker.ps1' is not recognized as the name of a cmdlet,
function, script file, or operable program. Check the spelling of the name, or
if a path was included, verify that the path is correct and try again.
At line:1 char:26
+ PSMConfigureAppLocker.ps1 <<<<
+ CategoryInfo : ObjectNotFound: (PSMConfigureAppLocker.ps1:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
OR
File C:\Program Files (x86)\CyberArk\PSM\Hardening\PSMConfigureAppLocker.ps1 cannot be loaded because the execution of scripts is disabled on this system. Please see "get-help about_signing" for more details
PROBLEM:
Not enough permissions to execute the command.
SOLUTION:
Run the following command prior the Hardening script, via Powershell:
Set-ExecutionPolicy -Force -ExecutionPolicy remotesigned