无法使用备用凭据在Jenkins上使用PowerShell插件运行启动作业作业

时间:2015-09-16 01:32:58

标签: powershell jenkins jenkins-plugins powershell-jobs

系统:Windows Server 2012 R2 | PowerShell v4 |詹金斯v1.607 | 64位Java版本8u60

无论出于何种原因,我都可以登录运行Jenkins的Windows服务器,并执行以下代码没有问题

Start-Job -Credential $Creds -ScriptBlock {Get-Process}
Get-Job | Wait-Job | Receive-Job

尝试在Jenkins作业中执行相同的代码时,使用PowerShell插件,使用我在$ Creds中使用的相同用户凭据,在没有任何有用信息的情况下失败。< / strong>凭据已经过验证。这是我得到的错误:

    [localhost] The background process reported an error with the following message: .
    + CategoryInfo          : OpenError: (localhost:String) [], PSRemotingTransportException
    + FullyQualifiedErrorId : 2100,PSSessionStateBroken

我使用Resolve-Error function, as found here,尝试获取更多信息。这是输出:

writeErrorStream      : True
PSMessageDetails      : 
Exception             : System.Management.Automation.Remoting.PSRemotingTransportException: The background process 
                        reported an error with the following message: .
TargetObject          : localhost
CategoryInfo          : OpenError: (localhost:String) [], PSRemotingTransportException
FullyQualifiedErrorId : 2100,PSSessionStateBroken
ErrorDetails          : [localhost] The background process reported an error with the following message: .
InvocationInfo        : 
ScriptStackTrace      : 
PipelineIterationInfo : {}


00000000000000000000000000000000000000000000000000000000000000000000000000000000


ErrorCode                   : 2100
TransportMessage            : 
ErrorRecord                 : The background process reported an error with the following message: .
StackTrace                  : 
WasThrownFromThrowStatement : False
Message                     : The background process reported an error with the following message: .
Data                        : {}
InnerException              : 
TargetSite                  : 
HelpLink                    : 
Source                      : 
HResult                     : -2146233087

仍然没有帮助信息。我对可能出现的问题感到茫然,并且不知道如何继续。

0 个答案:

没有答案