【发布时间】:2014-06-08 22:55:13
【问题描述】:
我们正在运行 PowerShell 脚本作为我们在 TeamCity 中自动构建的一部分,但它失败并出现以下错误:
[16:31:49][Step 1/1] File F:\<path>\sript.ps1 cann
[16:31:49][Step 1/1] ot be loaded because the execution of scripts is disabled on this system. Pleas
[16:31:49][Step 1/1] e see "get-help about_signing" for more details.
我在这台机器上将执行策略设置为Unrestricted:
PS C:\> Get-ExecutionPolicy
Unrestricted
我可以从 PS 控制台手动运行同样的脚本,只是从 TeamCity 执行失败。有什么想法吗?
EDIT: As requested:
PS C:\Users\xxx> Get-ExecutionPolicy -List
Scope ExecutionPolicy
----- ---------------
MachinePolicy Undefined
UserPolicy Undefined
Process Undefined
CurrentUser Undefined
LocalMachine Unrestricted
【问题讨论】:
-
@jscott,请看编辑
标签: powershell teamcity