Internet Handholding posted on April 28, 2011 13:25
Powershell scripts are programs and can take over your computer. They are potentially dangerous, so by default Powershell scripts are disabled.
You will need to turn on Powershell scripts to run your script.
The get-executionpolicy cmdlet tells you what the execution policy is. To see your execution policy, run
get-executionpolicy
Set-executionpolicy turns on and off the policy.To turn on the execution policy, execute so only remotely signed trusted scripts and scripts saved on your computer work, run.
set-executionpolicy remotesigned
This is the one you want. That way you will not run scripts in email or downloaded from Internet websites that you have not trusted.
After your scripting session, to turn off scripts, run
set-executionpolicy restricted
By Andrew Weitzen, Bronze Inc. Copyright (c) 2011
Bronze is the publisher of several online Internet journals including: InternetHandholding.com, DomainNames.gs, DotNetNuke.bz, Programmer.bz, Software.vg, WebHosting.vg