In my release definition I have a task to run powershell on target machine. (ARM VM)
My test.ps1 is located on the c drive
I have also ran Enable-PSremoting on the virtual machine
And also setup the ports on the azure portal
I get the following output error from my output log
2016-09-02T08:12:47.5272534Z ##[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-09-02T08:12:47.5272534Z ##[error] --- End of inner exception stack trace ---
2016-09-02T08:12:47.5282539Z ##[error] at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)
2016-09-02T08:12:47.5292530Z ##[error] at System.Management.Automation.PowerShell.Worker.ConstructPipelineAndDoWork(Runspace rs, Boolean performSyncInvoke)
2016-09-02T08:12:47.5302533Z ##[error] at System.Management.Automation.PowerShell.Worker.CreateRunspaceIfNeededAndDoWork(Runspace rsToUse, Boolean isSync)
2016-09-02T08:12:47.5302533Z ##[error] at System.Management.Automation.PowerShell.CoreInvokeHelperTInput,TOutput
2016-09-02T08:12:47.5314214Z ##[error] at System.Management.Automation.PowerShell.CoreInvokeTInput,TOutput
2016-09-02T08:12:47.5322532Z ##[error] at Microsoft.TeamFoundation.DistributedTask.Handlers.PowerShellHandler.Execute(ITaskContext context, CancellationToken cancellationToken, Int32 timeoutInMinutes)
2016-09-02T08:12:47.5334361Z ##[error] at Microsoft.TeamFoundation.DistributedTask.Worker.JobRunner.RunTask(ITaskContext context, TaskWrapper task, CancellationTokenSource tokenSource)
Is it because of PS Remoting?
@Michael, Seems your azure username has a dot('.') operator in it. The issue is happening because of it.
Use an another azure user name with no dot characters in it.
@pavanadepu2 This should be reopened and fixed. Many corporate environments have strict username requirements, which frequently include periods as separators between words or names (ex: daniel.mann). We shouldn't have to request exceptions and have accounts renamed in order to use this task.
All valid Windows user names should work with all tasks that require a user name.