TFS任务在远程机器上运行Power shell错误。System.Management.Automation.RuntimeException.错误,无法安装'VisualStudioRemoteDeployer'。安装'VisualStudioRemoteDeployer'失败。

问题描述 投票:0回答:1

在我的TFS 2018光盘中,我有一个任务 "Run PowerShell on remote Machine",它失败了,错误如下

System.Management.Automation.RuntimeException: Failed to install 'VisualStudioRemoteDeployer

找到任务配置如下

enter image description here

查找完整的错误日志如下

2020-05-05T06:49:22.4862201Z Exception calling "SetRight" with "2" argument(s): "Could not obtain the user information." 2020-05-05T06:49:22.4862692Z CategoryInfo :NotSpecified: (:) [], MethodInvocationException 2020-05-05T06:49:22.4862987Z FullyQualifiedErrorId :Exception 2020-05-05T06:49:22.4863348Z ---> System.Management.Automation.RemoteException: Exception calling "SetRight" with "2" argument(s): "Could not obtain the user information." 2020-05-05T06:49:22.4863751Z --- End of inner exception stack trace --- 2020-05-05T06:49:22.4864154Z at Microsoft.VisualStudio.Services.DevTestLabs.Deployment.Deployment.PowershellExecutor.Invoke(String errorContextMessage, Boolean writeResultToLog, Boolean isCancellable) 2020-05-05T06:49:22.4864655Z at Microsoft.VisualStudio.Services.DevTestLabs.Deployment.Deployment.RemoteDeploymentHelper.InstallServiceInternal(String serviceSourcePath, String serviceName, String destinationFileName) 2020-05-05T06:49:22.4865266Z at Microsoft.VisualStudio.Services.DevTestLabs.Deployment.Deployment.RemoteDeploymentHelper.InstallService(String serviceSourcePath, String serviceName, String destinationFileName) 2020-05-05T06:49:22.4865783Z at Microsoft.VisualStudio.Services.DevTestLabs.Deployment.Deployment.DeploymentClient.<RunAsync>d__24.MoveNext() 2020-05-05T06:49:22.4866260Z ---> (Inner Exception #0) System.Management.Automation.RemoteException: Exception calling "SetRight" with "2" argument(s): "Could not obtain the user information."<--- 2020-05-05T06:49:22.4866523Z 2020-05-05T06:49:22.4866665Z 2020-05-05T06:49:22.5010643Z Deployment status for machine 'XXXXX:5985' : 'Failed' 2020-05-05T06:49:22.5565354Z ##[error], MethodInvocationException\r\n FullyQualifiedErrorId :Exception\r\n"}};] 2020-05-05T06:49:22.5588511Z 2020-05-05T06:49:22.5588871Z 2020-05-05T06:49:22.5951437Z ##[error]System.Management.Automation.RuntimeException: Failed to install 'VisualStudioRemoteDeployerc87a55d0-555b-426c-b80f-1cf90ad0bf1c' from service executable path VisualStudioRemoteDeployer.exe . Consult the logs below: 2020-05-05T06:49:22.5952932Z Exception calling "SetRight" with "2" argument(s): "Could not obtain the user information." 2020-05-05T06:49:22.5953641Z CategoryInfo :NotSpecified: (:) [], MethodInvocationException 2020-05-05T06:49:22.5954109Z FullyQualifiedErrorId :Exception 2020-05-05T06:49:22.5954536Z ---> System.Management.Automation.RuntimeException: Failed to install 'VisualStudioRemoteDeployerc87a55d0-555b-426c-b80f-1cf90ad0bf1c' from service executable path VisualStudioRemoteDeployer.exe . Consult the logs below: 2020-05-05T06:49:22.5955018Z Exception calling "SetRight" with "2" argument(s): "Could not obtain the user information." 2020-05-05T06:49:22.5955350Z CategoryInfo :NotSpecified: (:) [], MethodInvocationException 2020-05-05T06:49:22.5955636Z FullyQualifiedErrorId :Exception 2020-05-05T06:49:22.5955873Z 2020-05-05T06:49:22.5956133Z --- End of inner exception stack trace --- 2020-05-05T06:49:22.5956455Z at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input) 2020-05-05T06:49:22.5959512Z at System.Management.Automation.PowerShell.Worker.ConstructPipelineAndDoWork(Runspace rs, Boolean performSyncInvoke) 2020-05-05T06:49:22.5959955Z at System.Management.Automation.PowerShell.Worker.CreateRunspaceIfNeededAndDoWork(Runspace rsToUse, Boolean isSync) 2020-05-05T06:49:22.5960388Z at System.Management.Automation.PowerShell.CoreInvokeHelper[TInput,TOutput](PSDataCollection1个输入,PSDataCollection1 output, PSInvocationSettings settings) 2020-05-05T06:49:22.5960842Z at System.Management.Automation.PowerShell.CoreInvoke[TInput,TOutput](PSDataCollection1个输入,PSDataCollection1 output, PSInvocationSettings settings) 2020-05-05T06:49:22.5961295Z at Microsoft.TeamFoundation.DistributedTask.Handlers.LegacyVSTSPowerShellHost.VSTSPowerShellHost.Main(String[] args) 2020-05-05T06:49:22.6472008Z ##[error]LegacyVSTSPowerShellHost.exe completed with return code: -1.

powershell tfs azure-pipelines powershell-2.0
1个回答
0
投票

这看起来和以下问题很有关系 这个 问题。根源应该与用户访问有关。确保配置中提供的用户凭证对目标机器和TFS有管理权限。这将解除对 VisualStudioRemoteDeployer 横行霸道 SetRight" with "2" argument(s): "Could not obtain the user information 问题。

© www.soinside.com 2019 - 2024. All rights reserved.