2

I am trying to set some VS tests to run remotely on a windows server machine. It downloads the needed artifacts to the target machine, but when trying to deploy the test agent, it fails with the following unclear error:

The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Exception calling ".ctor" with "2" argument(s): "One or more errors occurred."'. For troubleshooting, refer https://aka.ms/remotevstest.

I looked at the ps script runnning, namely TestAgentConfiguration.ps1 and it looks like it fails when trying to run this line

$DtaAgentClient = New-Object Microsoft.VisualStudio.TestService.Utility.TestExecutionServiceRestApiHelper -ArgumentList $TfsCollection, $PersonalAccessToken

However, I do have access to the TFS server from the target machine... any ideas?

Here is the entire log:

2017-12-12T13:38:04.7959295Z ##[section]Starting: Deploy TestAgent on 
2017-12-12T13:38:04.8099296Z ==============================================================================
2017-12-12T13:38:04.8099296Z Task         : Visual Studio Test Agent Deployment
2017-12-12T13:38:04.8109296Z Description  : Deploy and configure Test Agent to run tests on a set of machines
2017-12-12T13:38:04.8109296Z Version      : 2.1.8
2017-12-12T13:38:04.8109296Z Author       : Microsoft Corporation
2017-12-12T13:38:04.8109296Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=838890)
2017-12-12T13:38:04.8109296Z ==============================================================================
2017-12-12T13:38:08.9079295Z ****************************************************************
2017-12-12T13:38:08.9079295Z                     Task Input Information                      
2017-12-12T13:38:08.9079295Z ----------------------------------------------------------------
2017-12-12T13:38:08.9079295Z testMachineInput         = x
2017-12-12T13:38:08.9079295Z adminUserName            = x
2017-12-12T13:38:08.9079295Z winRmProtocal            = Http
2017-12-12T13:38:08.9079295Z testCertificate          = true
2017-12-12T13:38:08.9079295Z machineUserName          = x
2017-12-12T13:38:08.9079295Z runAsProcess             = false
2017-12-12T13:38:08.9079295Z logonAutomatically       = false
2017-12-12T13:38:08.9079295Z disableScreenSaver       = false
2017-12-12T13:38:08.9079295Z isDataCollectionOnly     = false
2017-12-12T13:38:08.9079295Z testPlatform             = 15.0
2017-12-12T13:38:08.9079295Z agentLocation            = 
2017-12-12T13:38:08.9079295Z updateTestAgent          = false
2017-12-12T13:38:08.9079295Z ****************************************************************
2017-12-12T13:38:09.8859300Z Starting to deploy and configure test agent on test machines.
2017-12-12T13:38:09.8869298Z Inputs provided are:
2017-12-12T13:38:09.8869298Z Use HTTP Port: True
2017-12-12T13:38:09.8869298Z Username: x
2017-12-12T13:38:09.8869298Z Disable Screen saver: False
2017-12-12T13:38:09.8869298Z Login Automatically: False
2017-12-12T13:38:09.8869298Z Run as process: False
2017-12-12T13:38:09.8869298Z Agent would be downloaded from https://go.microsoft.com/fwlink/?LinkId=615472
2017-12-12T13:38:09.8869298Z Update test agent: False
2017-12-12T13:38:09.8869298Z Run test agent as DataCollection only : False
2017-12-12T13:38:10.3119286Z Task 'VerifyTestAgentInstalled' on machine 'x:5985' is being run
2017-12-12T13:38:15.1009298Z Task 'VerifyTestAgentInstalled' on machine 'x:5985' completed.
2017-12-12T13:38:15.1099303Z     Deployment started on target machine...
2017-12-12T13:38:15.1099303Z 
2017-12-12T13:38:15.1099303Z Query for Testplatfrom version: 15.0
2017-12-12T13:38:15.1099303Z 
2017-12-12T13:38:15.1099303Z Testing container: 'REGISTRY::HKEY_CLASSES_ROOT\CLSID\{177F0C4A-1CD3-4DE7-A32C-71DBBB9FA36D}'
2017-12-12T13:38:15.1099303Z 
2017-12-12T13:38:15.1099303Z Does not exist.
2017-12-12T13:38:15.1109292Z 
2017-12-12T13:38:15.1109292Z Test Agent does not exists
2017-12-12T13:38:15.1109292Z 
2017-12-12T13:38:15.1109292Z 
2017-12-12T13:38:15.1109292Z RemoteDeployerSource Verbose: 2 : [RemoteDeployer][12:dec:17:14:38:11:8551; 1540, 4](NPSIIS2012R2-01)Created public key for communication
2017-12-12T13:38:15.1109292Z RemoteDeployerSource Information: 12 : [RemoteDeployer][12:dec:17:14:38:11:8551; 1540, 4](NPSIIS2012R2-01)Deployment service - VisualStudioRemoteDeployer6df0f6fb-f194-4fb7-97fa-d74cb1d363aa is running...
2017-12-12T13:38:15.1109292Z RemoteDeployerSource Verbose: 4 : [RemoteDeployer][12:dec:17:14:38:12:8862; 1540, 5](NPSIIS2012R2-01)Input file found
2017-12-12T13:38:15.1109292Z RemoteDeployerSource Verbose: 5 : [RemoteDeployer][12:dec:17:14:38:12:8862; 1540, 5](NPSIIS2012R2-01)Reading input parameters
2017-12-12T13:38:15.1109292Z RemoteDeployerSource Verbose: 6 : [RemoteDeployer][12:dec:17:14:38:12:8862; 1540, 5](NPSIIS2012R2-01)Finished reading input parameters
2017-12-12T13:38:15.1109292Z 
2017-12-12T13:38:17.3459301Z Starting to download testagent
2017-12-12T13:38:17.3499295Z testagent is downloaded at: C:\TestAgent\58435510-14c6-40f3-ab6b-61fb7d45d0ed
2017-12-12T13:38:17.3499295Z Task 'CopyFilesToTestAgent' on machine 'x:5985' is being run
2017-12-12T13:38:17.3499295Z Task 'CopyFilesToTestAgent' on machine 'x:5985' completed.
2017-12-12T13:38:17.3499295Z 
2017-12-12T13:38:17.3499295Z \\x was deleted successfully.
2017-12-12T13:38:17.3499295Z 
2017-12-12T13:38:17.3509293Z Copying recursively from C:\TestAgent\58435510-14c6-40f3-ab6b-61fb7d45d0ed to C:\TestAgent on machine x succeeded.
2017-12-12T13:38:17.3509293Z 
2017-12-12T13:38:17.3509293Z \\x was deleted successfully.
2017-12-12T13:38:17.3509293Z 
2017-12-12T13:38:17.3509293Z 
2017-12-12T13:39:17.1479291Z Task 'InstallTestAgent' on machine 'x:5985' is being run
2017-12-12T13:40:17.1549303Z Task 'InstallTestAgent' on machine 'x:5985' is taking time. Please Wait
2017-12-12T13:41:14.2969287Z     Deployment started on target machine...
2017-12-12T13:41:14.2969287Z 
2017-12-12T13:41:14.2969287Z Setup path: C:\TestAgent\vstf_testagent.exe
2017-12-12T13:41:14.2969287Z 
2017-12-12T13:41:14.2969287Z Testing container: 'REGISTRY::HKEY_CLASSES_ROOT\CLSID\{177F0C4A-1CD3-4DE7-A32C-71DBBB9FA36D}'
2017-12-12T13:41:14.2969287Z 
2017-12-12T13:41:14.2969287Z Does not exist.
2017-12-12T13:41:14.2969287Z 
2017-12-12T13:41:14.2969287Z Installed Test Agent version: 0.0
2017-12-12T13:41:14.2969287Z 
2017-12-12T13:41:14.2969287Z Requested Test Agent version: 15.5.27130
2017-12-12T13:41:14.2969287Z 
2017-12-12T13:41:14.2969287Z Test Agent will be installed
2017-12-12T13:41:14.2969287Z 
2017-12-12T13:41:14.2969287Z No test agent certificate found.
2017-12-12T13:41:14.2969287Z 
2017-12-12T13:41:14.2969287Z Exit code from installation 0 
2017-12-12T13:41:14.2969287Z 
2017-12-12T13:41:14.2969287Z 
2017-12-12T13:41:14.2969287Z RemoteDeployerSource Verbose: 2 : [RemoteDeployer][12:dec:17:14:39:17:8071; 2820, 4](x)Created public key for communication
2017-12-12T13:41:14.2969287Z RemoteDeployerSource Information: 12 : [RemoteDeployer][12:dec:17:14:39:17:8071; 2820, 4](x)Deployment service - VisualStudioRemoteDeployer38030956-3f0b-4c95-8984-02555aeeb5cf is running...
2017-12-12T13:41:14.2969287Z RemoteDeployerSource Verbose: 4 : [RemoteDeployer][12:dec:17:14:39:18:8259; 2820, 5](x)Input file found
2017-12-12T13:41:14.2969287Z RemoteDeployerSource Verbose: 5 : [RemoteDeployer][12:dec:17:14:39:18:8259; 2820, 5](x)Reading input parameters
2017-12-12T13:41:14.2969287Z RemoteDeployerSource Verbose: 6 : [RemoteDeployer][12:dec:17:14:39:18:8259; 2820, 5](x)Finished reading input parameters
2017-12-12T13:41:14.2969287Z 
2017-12-12T13:41:14.2979294Z Task 'InstallTestAgent' on machine 'x:5985' completed.
2017-12-12T13:41:14.5299296Z Task 'CopyFilesToTestAgent' on machine 'x:5985' is being run
2017-12-12T13:41:14.9079281Z 
2017-12-12T13:41:14.9079281Z \\x was deleted successfully.
2017-12-12T13:41:14.9079281Z 
2017-12-12T13:41:14.9079281Z Copying recursively from C:\Builds2015\agent2\_work\_tasks\DeployVisualStudioTestAgent_52a38a6a-1517-41d7-96cc-73ee0c60d2b6\2.1.8\TestExecution.zip to C:\TestAgent on machine x succeeded.
2017-12-12T13:41:14.9079281Z 
2017-12-12T13:41:14.9089280Z \\x was deleted successfully.
2017-12-12T13:41:14.9089280Z 
2017-12-12T13:41:14.9089280Z 
2017-12-12T13:41:14.9089280Z Task 'CopyFilesToTestAgent' on machine 'x:5985' completed.
2017-12-12T13:41:14.9323708Z Task 'TestAgentConfiguration' on machine 'x:5985' is being run
2017-12-12T13:42:10.9609296Z RemoteDeployerSource Verbose: 2 : [RemoteDeployer][12:dec:17:14:41:15:5500; 3360, 4](x)Created public key for communication
2017-12-12T13:42:10.9609296Z RemoteDeployerSource Information: 12 : [RemoteDeployer][12:dec:17:14:41:15:5500; 3360, 4](x)Deployment service - VisualStudioRemoteDeployerd005bda2-0ecf-4c84-9457-612a290bec8a is running...
2017-12-12T13:42:10.9609296Z RemoteDeployerSource Verbose: 4 : [RemoteDeployer][12:dec:17:14:41:16:5705; 3360, 5](x)Input file found
2017-12-12T13:42:10.9609296Z RemoteDeployerSource Verbose: 5 : [RemoteDeployer][12:dec:17:14:41:16:5705; 3360, 5](x)Reading input parameters
2017-12-12T13:42:10.9609296Z RemoteDeployerSource Verbose: 6 : [RemoteDeployer][12:dec:17:14:41:16:5705; 3360, 5](x)Finished reading input parameters
2017-12-12T13:42:10.9609296Z 
2017-12-12T13:42:10.9609296Z Task 'TestAgentConfiguration' on machine 'x:5985' completed.
2017-12-12T13:42:10.9609296Z ##[warning]Task 'TestAgentConfiguration' for machine x:5985's Error : System.Exception: The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Exception calling ".ctor" with "2" argument(s): "One or more errors occurred."
2017-12-12T13:42:10.9619289Z ##[warning]Task 'TestAgentConfiguration' for machine x:5985's Log : 
2017-12-12T13:42:10.9619289Z     Deployment started on target machine...
2017-12-12T13:42:10.9619289Z 
2017-12-12T13:42:10.9619289Z System.AggregateException: Failed to execute the powershell script. Consult the logs below for details of the error.
2017-12-12T13:42:10.9619289Z The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Exception calling ".ctor" with "2" argument(s): "One or more errors occurred." ---> System.Management.Automation.ActionPreferenceStopException: The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Exception calling ".ctor" with "2" argument(s): "One or more errors occurred."
2017-12-12T13:42:10.9619289Z    at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)
2017-12-12T13:42:10.9619289Z    at System.Management.Automation.PowerShell.Worker.ConstructPipelineAndDoWork(Runspace rs, Boolean performSyncInvoke)
2017-12-12T13:42:10.9619289Z    at System.Management.Automation.PowerShell.Worker.CreateRunspaceIfNeededAndDoWork(Runspace rsToUse, Boolean isSync)
2017-12-12T13:42:10.9619289Z    at System.Management.Automation.PowerShell.CoreInvokeHelper[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
2017-12-12T13:42:10.9619289Z    at System.Management.Automation.PowerShell.CoreInvoke[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
2017-12-12T13:42:10.9619289Z    at System.Management.Automation.PowerShell.Invoke(IEnumerable input, PSInvocationSettings settings)
2017-12-12T13:42:10.9619289Z    at Microsoft.VisualStudio.Services.DevTestLabs.RemoteDeployer.Deployment.PowershellExecutor.<>c__DisplayClass28_0.<Invoke>b__0()
2017-12-12T13:42:10.9619289Z    at Microsoft.VisualStudio.Services.DevTestLabs.RemoteDeployer.Utilities.RetryExecutor.<>c__DisplayClass19_0`1.<Execute>b__0()
2017-12-12T13:42:10.9619289Z    at Microsoft.VisualStudio.Services.DevTestLabs.RemoteDeployer.Utilities.RetryExecutor.Execute(Action action)
2017-12-12T13:42:10.9619289Z    at Microsoft.VisualStudio.Services.DevTestLabs.RemoteDeployer.Utilities.RetryExecutor.Execute[T](Func`1 action)
2017-12-12T13:42:10.9629284Z    at Microsoft.VisualStudio.Services.DevTestLabs.RemoteDeployer.Deployment.PowershellExecutor.Invoke(String errorContextMessage, Boolean writeResultToLog, Boolean isCancellable, ActionPreference errorActionPreference)
2017-12-12T13:42:10.9629284Z    --- End of inner exception stack trace ---
2017-12-12T13:42:10.9629284Z    at Microsoft.VisualStudio.Services.DevTestLabs.RemoteDeployer.Deployment.PowershellExecutor.Invoke(String errorContextMessage, Boolean writeResultToLog, Boolean isCancellable, ActionPreference errorActionPreference)
2017-12-12T13:42:10.9629284Z    at Microsoft.VisualStudio.Services.DevTestLabs.RemoteDeployer.Deployment.ScriptExecutor.ExecuteScript(IPowerShell powerShell, String script, String arguments, Boolean isScriptDotSourced, Boolean useHttp)
2017-12-12T13:42:10.9629284Z    at Microsoft.VisualStudio.Services.DevTestLabs.RemoteDeployer.Deployment.DeploymentService.RunPowerShellScripts(DeploymentMachineSpecification deploymentMachine, ScriptSpecification scriptSpecification, ScriptSpecification initializationScriptSpecification, String applicationPath, IPowerShell powerShellSession)
2017-12-12T13:42:10.9639291Z ---> (Inner Exception #0) System.Management.Automation.ActionPreferenceStopException: The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Exception calling ".ctor" with "2" argument(s): "One or more errors occurred."
2017-12-12T13:42:10.9639291Z    at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)
2017-12-12T13:42:10.9639291Z    at System.Management.Automation.PowerShell.Worker.ConstructPipelineAndDoWork(Runspace rs, Boolean performSyncInvoke)
2017-12-12T13:42:10.9639291Z    at System.Management.Automation.PowerShell.Worker.CreateRunspaceIfNeededAndDoWork(Runspace rsToUse, Boolean isSync)
2017-12-12T13:42:10.9639291Z    at System.Management.Automation.PowerShell.CoreInvokeHelper[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
2017-12-12T13:42:10.9649298Z    at System.Management.Automation.PowerShell.CoreInvoke[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
2017-12-12T13:42:10.9649298Z    at System.Management.Automation.PowerShell.Invoke(IEnumerable input, PSInvocationSettings settings)
2017-12-12T13:42:10.9649298Z    at Microsoft.VisualStudio.Services.DevTestLabs.RemoteDeployer.Deployment.PowershellExecutor.<>c__DisplayClass28_0.<Invoke>b__0()
2017-12-12T13:42:10.9649298Z    at Microsoft.VisualStudio.Services.DevTestLabs.RemoteDeployer.Utilities.RetryExecutor.<>c__DisplayClass19_0`1.<Execute>b__0()
2017-12-12T13:42:10.9649298Z    at Microsoft.VisualStudio.Services.DevTestLabs.RemoteDeployer.Utilities.RetryExecutor.Execute(Action action)
2017-12-12T13:42:10.9649298Z    at Microsoft.VisualStudio.Services.DevTestLabs.RemoteDeployer.Utilities.RetryExecutor.Execute[T](Func`1 action)
2017-12-12T13:42:10.9649298Z    at Microsoft.VisualStudio.Services.DevTestLabs.RemoteDeployer.Deployment.PowershellExecutor.Invoke(String errorContextMessage, Boolean writeResultToLog, Boolean isCancellable, ActionPreference errorActionPreference)<---
2017-12-12T13:42:10.9649298Z Testing container: 'REGISTRY::HKEY_CLASSES_ROOT\CLSID\{177F0C4A-1CD3-4DE7-A32C-71DBBB9FA36D}'
2017-12-12T13:42:10.9649298Z 
2017-12-12T13:42:10.9649298Z Exists.
2017-12-12T13:42:10.9649298Z 
2017-12-12T13:42:10.9649298Z Getting Visual Studio setup instances.
2017-12-12T13:42:10.9649298Z 
2017-12-12T13:42:10.9649298Z Found 1 instances.
2017-12-12T13:42:10.9649298Z 
2017-12-12T13:42:10.9649298Z 
2017-12-12T13:42:10.9649298Z 
2017-12-12T13:42:10.9649298Z Description   : Supports running automated tests and load tests remotely
2017-12-12T13:42:10.9649298Z DisplayName   : Visual Studio Test Agent 2017
2017-12-12T13:42:10.9649298Z Id            : 48324a16
2017-12-12T13:42:10.9659298Z InstallDate   : System.Runtime.InteropServices.ComTypes.FILETIME
2017-12-12T13:42:10.9659298Z Name          : VisualStudio/15.5.1+27130.2003
2017-12-12T13:42:10.9659298Z Path          : C:\TestAgent2017
2017-12-12T13:42:10.9659298Z Version       : 15.5.27130.2003
2017-12-12T13:42:10.9659298Z VersionString : 15.5.27130.2003
2017-12-12T13:42:10.9659298Z 
2017-12-12T13:42:10.9659298Z 
2017-12-12T13:42:10.9659298Z 
2017-12-12T13:42:10.9659298Z 
2017-12-12T13:42:10.9659298Z 
2017-12-12T13:42:10.9659298Z VS path C:\TestAgent2017\Common7\IDE; Test window path C:\TestAgent2017\Common7\IDE\CommonExtensions\Microsoft\TestWindow
2017-12-12T13:42:10.9659298Z 
2017-12-12T13:42:10.9659298Z Path: C:\TestAgent\TfsAssemblies\Newtonsoft.Json.dll
2017-12-12T13:42:10.9659298Z 
2017-12-12T13:42:10.9659298Z Loading module from path 'C:\TestAgent\TfsAssemblies\Newtonsoft.Json.dll'.
2017-12-12T13:42:10.9659298Z 
2017-12-12T13:42:10.9659298Z Loading module from path 'C:\TestAgent\TfsAssemblies\System.Net.Http.Formatting.dll'.
2017-12-12T13:42:10.9659298Z 
2017-12-12T13:42:10.9659298Z Loading module from path 'C:\TestAgent\TfsAssemblies\Microsoft.TeamFoundation.DistributedTask.Task.TestExecution.dll'.
2017-12-12T13:42:10.9659298Z 
2017-12-12T13:42:10.9659298Z Loading module from path 'C:\TestAgent\TfsAssemblies\Microsoft.TeamFoundation.Common.dll'.
2017-12-12T13:42:10.9659298Z 
2017-12-12T13:42:10.9669287Z Loading module from path 'C:\TestAgent\TfsAssemblies\Microsoft.TeamFoundation.Test.WebApi.dll'.
2017-12-12T13:42:10.9669287Z 
2017-12-12T13:42:10.9669287Z Loading module from path 'C:\TestAgent\TfsAssemblies\Microsoft.VisualStudio.Services.Common.dll'.
2017-12-12T13:42:10.9669287Z 
2017-12-12T13:42:10.9669287Z Loading module from path 'C:\TestAgent\TfsAssemblies\Microsoft.VisualStudio.Services.WebApi.dll'.
2017-12-12T13:42:10.9669287Z 
2017-12-12T13:42:10.9669287Z Loading module from path 'C:\TestAgent\PrivateAssemblies\MS.VS.TestService.Client.Utility.dll'.
2017-12-12T13:42:10.9669287Z 
2017-12-12T13:42:10.9669287Z ****************************************************************
2017-12-12T13:42:10.9669287Z 
2017-12-12T13:42:10.9669287Z                     Configure Test Agent                      
2017-12-12T13:42:10.9669287Z 
2017-12-12T13:42:10.9669287Z ----------------------------------------------------------------
2017-12-12T13:42:10.9669287Z 
2017-12-12T13:42:10.9669287Z SetupPath                       : (C:\TestAgent)
2017-12-12T13:42:10.9669287Z 
2017-12-12T13:42:10.9669287Z TestUserName                    : (x)
2017-12-12T13:42:10.9669287Z 
2017-12-12T13:42:10.9669287Z TfsCollection                   : (x)
2017-12-12T13:42:10.9679288Z 
2017-12-12T13:42:10.9679288Z AsServiceOrProcess              : (Service)
2017-12-12T13:42:10.9679288Z 
2017-12-12T13:42:10.9679288Z EnvironmentUrl                  : (x)
2017-12-12T13:42:10.9679288Z 
2017-12-12T13:42:10.9679288Z MachineName                     : (x)
2017-12-12T13:42:10.9679288Z 
2017-12-12T13:42:10.9679288Z Capabilities                    : ()
2017-12-12T13:42:10.9679288Z 
2017-12-12T13:42:10.9679288Z TestAgentVersion                : (15.0)
2017-12-12T13:42:10.9679288Z 
2017-12-12T13:42:10.9679288Z ****************************************************************
2017-12-12T13:42:10.9679288Z 
2017-12-12T13:42:10.9679288Z 
2017-12-12T13:42:10.9679288Z ##[error]Error occured on 'x:5985'. Details : 'The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Exception calling ".ctor" with "2" argument(s): "One or more errors occurred."'. For troubleshooting, refer https://aka.ms/remotevstest.
2017-12-12T13:42:11.0919296Z ##[section]Finishing: Deploy TestAgent on 

1 Answer 1

1

Update:

The current version Visual Studio Test Agent Deployment (v2) which you are using is supported with TFS 2017 onwards.

Since Test agent 2017 is only support with TAD v2 , so you have to update your TFS server version such as TFS2017update3. Otherwise, you need rollback to TAD v1 and use Test Agent 2015.

Also take a look at prawalagarwal's comment in this similar question: Run tests tasks failing after Deploy Agent task


Besides please notice, Visual Studio Test Agent Deployment task requires the target computer to have:

  • Windows 7 Service Pack 1 or Windows 2008 R2 Service Pack 2 or higher
  • .NET 4.5 or higher
  • PSRemoting enabled by running the Enable-PSRemoting PowerShell script .
8
  • 1
    Thanks for the reply. Forgot to mention what I tried and the environment I am running on. The target machine is a 2012R2 server in domain. I have enabled psremoting and I can successfully remote ps from the build server to the test machine (I have added the machine in trustedhosts on the build server). There is no proxy settings in IE and I have also enabled TLS 1.2 on the test server (I saw the article and tried it before actually). It seems like things are in place but still getting the error ... also they could be more specific with the error message...
    – cris
    Commented Dec 12, 2017 at 9:14
  • @cristina Sorry about the error message, there will be better logging here in the future. Have you tried to use Test Agent Deployment task version1? And what's the test agent version are you working with? Commented Dec 12, 2017 at 9:51
  • I am using test agent version 15. I tried to switch to Task Agent Deployment version 1, but then I have a different problem: I am getting the error "Unable to find TestAgent installation path" (even though the testagent location is correct and I the agent is installed).
    – cris
    Commented Dec 12, 2017 at 11:59
  • @cristina According to your error log, seems the agent have installed on your test agent machine. Visual Studio Test Agent Deployment task is used to Deploy and configure the test agent on machines. This task will download from internet and deploy “Test Agents” to all the machines , configures them automatically. You should not install the agent on your server. And if you want to specify test agent location, this path is the test agent (vstf_testagent.exe) such as visualstudio.com/downloads and used to install the agent. Not the path which agent already installed. Commented Dec 12, 2017 at 13:18
  • 1
    Ok, after some time I got it to work with TFS 2017 and TAD v2. Started with clean environment, checked all permissions etc and it finally works. Thanks for the help!
    – cris
    Commented Dec 14, 2017 at 9:48

Not the answer you're looking for? Browse other questions tagged or ask your own question.