Running Unsigned Scripts
Scenario/Problem: You need to be able to run unsigned scripts within PowerShell.
Solution: Use the Set-ExecutionPolicy
command.
To run unsigned scripts, you must change the execution policy:
Set-ExecutionPolicy remotesigned
You are prompted with a confirmation. Enter Y
and press Enter (or just press Enter—Y
is the default).
In some cases, you must set the policy to Unrestricted:
Set-ExecutionPolicy unrestricted
Tip
For more information on signing scripts, see http://technet.microsoft.com/en-us/library/dd347649.aspx
Get PowerShell™ for SharePoint® 2013 How-To 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.