I'm trying to execute a powershell on target machines
build task (template) in TFS server 2015, but getting the exception below.
##[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
I was able to successfully run Windows Machine File Copy Task
for the same server and configured both client and target servers as described on msdn. In this task I'm specifying admin login in format remote-machine-ip\username and everything gets copied. The same configuration does not work with powershell on target machines
build task.
I have found a post with a very similar exception on msdn, and understand this might be a problem of not including the domain. I tried specifying my login in format domain\username, but the remote powershell task still fails.
Below are the screenshots of the powershell task and related machine group:
According to the extended information:
There is no information mentioned to support <Machine-Group>
in the configuration of the Machines'
Please try to use machine IP address along with ports directly instead of <Machine-Group>
.
And also use username and password in the Admin Login
& Password
directly, then try it again.