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