Error : file .ps1 cannot be loaded because the execution of scripts is disabled on this system

During execution of  powershell script you may face the error "File .......ps1 cannot be loaded because the execution of scripts is disabled on this system."

This is because the script execution is by default disable. You will have to enable it to execute the powershell scripts.

To enable the script execution run following commandlet on powershell.

Set-ExecutionPolicy Unrestricted

OR

Set-ExecutionPolicy Unrestricted -Force

For more information please refer the here Running Windows PowerShell Scripts.

No comments:

Post a Comment

Golang: Http POST Request with JSON Body example

Go standard library comes with "net/http" package which has excellent support for HTTP Client and Server.   In order to post JSON ...