SharePoint 2013: Execution Policy for PowerShell

PowerShell is a very powerful administrative tool, just like old school batch job kind of scripting.

PowerShell team at Microsoft knows that the security concerns when running PowerShell scripts which may post a major security thread thus no powershell script can be run unless the execution policy is set from Restricted to Unrestricted\ByPass or the script is signed individually.


If you directly run PowerShell scripting, you will encounter the error like below:





Following technet way("http://technet.microsoft.com/en-us/library/ee176961.aspx") you can actually set the policy to unrestricted\bypass.





Try execute the script again, you will able to run it.




Let set the script back to unrestricted and run the Hello.ps1 again to show the error.





Next install SharePoint 2013 and you will see after the installation, the execution policy is set to ByPass.




Conclusion: After installation of SharePoint 2013, the installer will change the execution policy so that the Administrator are able to to run power shell script.








 

Comments

Popular posts from this blog

SharePoint 2013: Distributed Cache Services

AWS: On Demand Capacity Reservation (ODCR) and preventing Insufficient Capacity Error (ICE)

File Structure (Part 1)