目标计算机上的TFS构建任务powershell失败

时间:2016-05-11 20:50:10

标签: tfsbuild tfs2015

我正在尝试在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任务和相关计算机组的屏幕截图:

enter image description here enter image description here

1 个答案:

答案 0 :(得分:0)

根据扩展信息:

enter image description here

<Machine-Group>的配置中,没有提及支持Machines'的信息请尝试直接使用机器IP地址和端口而不是<Machine-Group>

并在Admin Login&amp;中使用用户名和密码。直接Password,然后再试一次。