Often you might need to execute an unsigned script that doesn't comply with the current execution policy. An easy way to do this is by bypassing the execution policy for that single process. Example:
powershell.exe -ExecutionPolicy Bypass -File C:\MyUnsignedScript.ps1
Or you can use the shorthand:
powershell -ep Bypass C:\MyUnsignedScript.ps1
|Only scripts signed by a trusted publisher can be run.|
|No restrictions; all Windows PowerShell scripts can be run.|
|Downloaded scripts must be signed by a trusted publisher before they can be run.|
|No scripts can be run. Windows PowerShell can be used only in interactive mode.|
|Similar to |
Unrestricted* Caveat: If you run an unsigned script that was downloaded from the Internet, you are prompted for permission before it runs.
More Information available here.