gpt4 book ai didi

powershell - Hudson不会使用Powershell插件运行任何Powershell脚本

转载 作者:行者123 更新时间:2023-12-02 04:14:38 24 4
gpt4 key购买 nike

使用Powershell插件从Hudson CI服务器执行Powershell脚本时遇到问题。我在跑:

  • Hudson v1.362
  • Windows 2003
  • Powershell 1.0

  • 我正在尝试将Powershell插件用于Hudson。我尝试的任何事情都会给我:
    File C:\DOCUME~1\SVC_PR~1\LOCALS~1\Temp\hudson2144883754471568213.ps1  
    cannot be loaded because the execution of scripts is disabled on this system.

    我已将 ExecutionPolicy设置为“ Unrestricted”,但仍然在Hudson中收到相同的消息。
  • 尝试重新启动Hudson-尚未解决。
  • 尝试将“Set-ExecutionPolicy Unrestricted”放入运行Hudson的帐户的Powershell配置文件中,仅成功给了我以上消息两次,而不是一次(哦,具有讽刺意味)
  • 尝试从命令行“Powershell -ExecutionPolicy Unrestricted”发出。
    返回的错误:“Missing expression after unary operator '-'. At line:1 char:2 + -ExecutionPolicy Unrestricted”-我假设是因为我使用的是Powershell 1,而-ExecutionPolicy不是v1选项。

  • 所以我被卡住了。任何有关如何使用此Poweshell插件让Hudson运行Powershell脚本的建议都将受到欢迎。

    谢谢

    杰米

    最佳答案

    好消息。安装Powershell v2似乎已解决了问题。我不是100%肯定所有问题都已解决,但是我可以使用适用于Hudson的Powershell插件成功执行Powershell命令,这是个好消息。

    感谢所有人的帮助,我希望该主题对以后的人们证明是有用的。

    问候
    杰米

    关于powershell - Hudson不会使用Powershell插件运行任何Powershell脚本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3424241/

    24 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com