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

powershell

#1

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.


#2

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