I'm having a play with Powershell and understanding how to control Visual Studio over the command line in a bid to try to understand the basics of the dev ops world.
If I run this in the command line
vstest.console "C:\Users\me\source\repos\Test03\UnitTestProject1\bin\Release\UnitTestProject1.dll"
It executes as desired.
If I run the same script from Powershell I get
Starting test execution, please wait...
vstest.console : An exception occurred while invoking executor 'executor://mstestadapter/v2': Access to the path 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\TestResults\Deploy_Me
2018-02-08 14_53_12' is denied.
At C:\Users\me\source\repos\Test03\autostageplan.ps1:12 char:1
+ vstest.console "C:\Users\me\source\repos\Test03\UnitTestProjec ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (An exception oc..._12' is denied.:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
vstest.console has been set up as an environment variable if that has any impact.
Does any one know why this would be?