Cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at http://go.microsoft.com

Hi ,
While executing Powershell “Invoke-Expression C:\Documents\UiPath\dummyp.ps1”
I am getting error :

System.Management.Automation.PSSecurityException: Cannot run software. Permission is denied.
UiPath\dummyp.ps1 cannot be loaded because running scripts is disabled on this system.

Hey @anjalimishra

Try to run first this command and let us know:
set-executionpolicy unrestricted //No restrictions; all Windows PowerShell scripts can be run
or
if you have downloaded this dummy script or using from other system then you can use -
Set-ExecutionPolicy RemoteSigned // Downloaded scripts must be signed by a trusted publisher before they can be run.

Even if still things will not work then you can bypass your file from execution policy as well:

> powershell -ExecutionPolicy ByPass -File dummyp.ps1

Regards…!!
Aksh

1 Like

Hey @18739932948

Need more info to understand your problem and it would be great if you can share your sample workflow or steps with your sample powershell file.

Regards…!!
Aksh