Neil Developer

解决:Microsoft.PowerShell_profile.ps1 cannot be loaded because the execution of scripts is disabled on this system. Please see “get-help about_signing” for more details.

2014-03-06
Neil

在执行powershell启动脚本的时候. 会报这个错

Microsoft.PowerShell_profile.ps1 cannot be loaded because the execution of scripts is disabled on this system. Please see “get-help about_signing” for more details.

原因是因为windows默认启用了安全策略, 禁止启动脚本.

查看策略:

PS C:\Windows\System32> Get-ExecutionPolicy

Restricted
PS C:\Windows\System32>

需要关闭它:

PS C:\Windows\System32> Set-Executionpolicy -ExecutionPolicy Unrestricted

这样就好了.

参考: http://www.christiano.ch/wordpress/2009/07/26/solution-microsoft-powershell_profile-ps1-cannot-be-loaded-because-the-execution-of-scripts-is-disabled-on-this-system-please-see-get-help-about_signing-for-more-details/

 


Comments

Content