When you are getting this issue while executing a power shell code ,open your Windows Power shell window and copy the below code and change your .ps1 file location to run the code.

 

powershell -ExecutionPolicy ByPass -File C:\abc.ps1
Advertisements