O-Xchange Notes from the Field!

Tuesday, May 3, 2011

The script will not execute on the system

Issue: trying to run powershell script got this error " script is not digitally signed and will not execute on the system
 
resolution:
 
 
By default Powershell restricts you from running "unsafe" scripts. Run the get-executionpolicy command to see what your system's level is at. To lower the restriction you can run Set-ExecutionPolicy and give it one of these as a parameter:
  • Restricted – No scripts can be run. Windows PowerShell can be used only in interactive mode.
  • AllSigned – Only scripts signed by a trusted publisher can be run.
  • RemoteSigned – Downloaded scripts must be signed by a trusted publisher before they can be run.
  • Unrestricted – No restrictions; all Windows PowerShell scripts can be run.

No comments:

Post a Comment