【问题标题】:TFS Build task powershell on target machines fails目标机器上的 TFS 构建任务 powershell 失败
【发布时间】:2017-08-17 04:04:27
【问题描述】:

我正在尝试在 TFS 服务器 2015 中执行 powershell on target machines 构建任务(模板),但出现以下异常。

##[debug]System.AggregateException: Failed to install 'VisualStudioRemoteDeployeref1cab6f-da11-4fcc-aae3-9f1433cd11ec' from service executable path VisualStudioRemoteDeployer.exe . Consult the logs below:
Exception calling "SetRight" with "2" argument(s): "Could not obtain the user information."
CategoryInfo :NotSpecified: (:) [], MethodInvocationException
FullyQualifiedErrorId :Exception
  ---> System.Management.Automation.RemoteException: Exception calling "SetRight" with "2" argument(s): "Could not obtain the user information."
    --- End of inner exception stack trace ---
    at Microsoft.VisualStudio.Services.DevTestLabs.Deployment.Deployment.PowershellExecutor.Invoke(String errorContextMessage, Boolean writeResultToLog, Boolean isCancellable)
    at Microsoft.VisualStudio.Services.DevTestLabs.Deployment.Deployment.RemoteDeploymentHelper.InstallServiceInternal(String serviceSourcePath, String serviceName, String destinationFileName)
    at Microsoft.VisualStudio.Services.DevTestLabs.Deployment.Deployment.RemoteDeploymentHelper.InstallService(String serviceSourcePath, String serviceName, String destinationFileName)
    at Microsoft.VisualStudio.Services.DevTestLabs.Deployment.Deployment.DeploymentClient.<RunAsync>d__24.MoveNext()
---> (Inner Exception #0) System.Management.Automation.RemoteException: Exception calling "SetRight" with "2" argument(s): "Could not obtain the user information."<---
##[error]Failed to install 'VisualStudioRemoteDeployeref1cab6f-da11-4fcc-aae3-9f1433cd11ec' from service executable path VisualStudioRemoteDeployer.exe . Consult the logs below:
##[error]Exception calling "SetRight" with "2" argument(s): "Could not obtain the user information."
##[error] CategoryInfo :NotSpecified: (:) [], MethodInvocationException
##[error] FullyQualifiedErrorId :Exception
##[error] For more info please refer to http://aka.ms/powershellontargetmachinesreadme

我能够为同一台服务器成功运行Windows Machine File Copy Task,并按照msdn 中的描述配置了客户端和目标服务器。在此任务中,我以 remote-machine-ip\username 格式指定管理员登录,并且所有内容都会被复制。相同的配置不适用于powershell on target machines 构建任务。

我在msdn 上发现了一个非常相似的异常的帖子,并且理解这可能是不包括域的问题。我尝试以 domain\username 格式指定我的登录名,但远程 powershell 任务仍然失败。

以下是powershell任务及相关机器组截图:

【问题讨论】:

    标签: tfsbuild tfs-2015


    【解决方案1】:

    根据扩展信息:

    Machines'的配置中没有提到支持&lt;Machine-Group&gt;的信息请尝试直接使用机器IP地址和端口而不是&lt;Machine-Group&gt;

    也可以直接在Admin Login&Password中使用用户名和密码,然后再试一次。

    【讨论】:

      猜你喜欢
      • 2017-02-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-03-08
      • 2017-04-10
      • 2019-01-04
      • 2018-05-12
      • 1970-01-01
      相关资源
      最近更新 更多