目标机器上的 TFS 构建任务 powershell 失败
TFS Build task powershell on target machines fails
我正在尝试在 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
构建任务。
我发现 post 在 msdn 上有一个非常相似的异常,我知道这可能是不包含域的问题。我尝试以 domain\username 格式指定我的登录名,但远程 powershell 任务仍然失败。
下面是powershell任务和相关机器组的截图:
根据扩展资料:
在 Machines'
的配置中没有提到支持 <Machine-Group>
的信息,请尝试直接使用机器 IP 地址和端口而不是 <Machine-Group>
。
并且直接在Admin Login
& Password
中使用用户名和密码,然后再试一次。
我正在尝试在 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
构建任务。
我发现 post 在 msdn 上有一个非常相似的异常,我知道这可能是不包含域的问题。我尝试以 domain\username 格式指定我的登录名,但远程 powershell 任务仍然失败。
下面是powershell任务和相关机器组的截图:
根据扩展资料:
在 Machines'
的配置中没有提到支持 <Machine-Group>
的信息,请尝试直接使用机器 IP 地址和端口而不是 <Machine-Group>
。
并且直接在Admin Login
& Password
中使用用户名和密码,然后再试一次。