Share via


Powershell Execution Policy on Vista

If you have downloaded and used RC1 of Powershell you will see that the Execution Policy is set to restricted by default.  This essentially means that scripts do not function by default within Powershell.  Although this is a great security feature that prevents the running of accidental scripts, it is not very usable.

To change this option you must run the following command from within Powershell:

Set-ExecutionPolicy Remotesigned

This will require that all scripts be signed prior to running or you can go all out and run:

Set-ExecutionPolicy Unrestricted

This allows you to run all scripts regardless of whether or not they are signed.

If you are trying to do this on Vista and you haven't disabled UAC then you will need to elevate Powershell prior to running the command.  Strangely enough, when you right click on Powershell in the "Start" (I don't know what to call this!!) menu there is no option to Run as Administrator.  To do this you must browse to the Powershell installation folder and right click on powershell.exe and click on Run as Administrator.