8.2. Execution Policies
With all the facilities that PowerShell puts into the hands of its users, you might wonder what's to stop the evildoers from using that program to gain access to your system and modify it in ways you might not appreciate. PowerShell runs under a policy that Microsoft calls "Secure by Default." That is, you have to specifically unlock PowerShell features to get them to run on your system or anyone else's system. There simply is no way to run a script on a system that has not been unlocked; the PowerShell program can start up, but it won't even run a user's profile file.
To allow scripts in PowerShell to run, you need to enable what is called an execution policy, which defines under what level of security an operation is ...
Get Microsoft® Windows Server® 2008: Implementation and Administration now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.