且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

无法启动脚本错误= 1314

更新时间:2023-09-23 11:04:22

您还应该允许您的系统执行PowerShell脚本。



一个典型的PowerShell命令是

 Set-ExecutionPolicy RemoteSigned 





要自己输入此命令,您需要在PowerShell下以交互方式执行此操作,并且应该以管理员身份启动PowerShell会话。



有关更多详细信息,请执行 Get-ExecutionPolicy 命令并阅读有关这些命令的帮助。另请参阅:

http://technet.microsoft.com/en-us /library/ee176949.aspx [ ^ ]。



新年快乐!



-SA

Tried to start a powershell script with Administrator rights and get error code = 1314. Failed to start program as user Administrator. This admin account has the "logon as service" privilege and all the rights to access and control the powershell script. The script works fine if launched as "local system" account.
Thanks for help

You also should allow your system to execute PowerShell scripts.

A typical PowerShell command would be
Set-ExecutionPolicy RemoteSigned



To enter this command itself, you need to do it interactively under PowerShell, and you should start PowerShell session as administrator.

For further detail, execute Get-ExecutionPolicy command and read help on these commands. See also:
http://technet.microsoft.com/en-us/library/ee176949.aspx[^].

Happy New Year!

—SA