0
votes

So I want to run a powershell script located on my azure virtual machine via the task run powershell on target machine within the release tool in team services.

However I get the following error

System.Management.Automation.RuntimeException: An object at the specified path C:\Users\ADMIN~1.USE does not exist. ---> System.Management.Automation.RuntimeException: An object at the specified path C:\Users\ADMIN~1.USE does not exist.

2016-08-31T10:21:37.0192754Z ##[error] --- End of inner exception stack trace ---

I have also ran Enable-PSremoting on the virtual machine

Any help would be great

Thanks

1
How do you specify PowerShell script file and machine in Run PowerShell On Target machine task? Could you ping that virtual machine from VSTS agent machine? What's the result if you run script through PowerShell from VSTS agent machine (Invoke-command) blogs.technet.microsoft.com/heyscriptingguy/2010/11/16/… - starian chen-MSFT
The machine is specified via the dns name and the script is specified via the path to where it is on the C drive - user1488692
Can you configure the virtual machine by following this link: howtogeek.com/117192/… and then try again. - Eddie Chen - MSFT
I have just tried everything in this example and the example works fine the release task still give me the error - user1488692
Are you using an Azure Classic Virtual Machine or Azure Resource Group? Refer to this link for details: visualstudio.com/docs/build/steps/deploy/… - Eddie Chen - MSFT

1 Answers

0
votes

The issue is occurs if your Virtial Machine's login user name has a dot('.') character in it. Try with a user name with no dots, which solve the above issue.