0

When creating a Azure DevTest lab VM, I am doing the following

  1. Selected a ""Windows Server R2 Datacenter " Image
  2. In artifacts I added i. Firefox Browser to install ii. Download VSTS Drop and Run Script (created and used a Personal secure Token with all scopes)

I created a ARM template and using it in my build definition to create vm and run the downloaded artifacts from VSTS.

Issue: When I don't add the (ii) above, I am able to create my VM fine but when I add (ii) in my ARM template i always see below error.

Error:

2017-06-06T19:11:24.1769032Z ##[error]**System.Management.Automation.ActionPreferenceStopException: The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: 
2017-06-06T19:11:24.1769032Z Cannot process command because of one or more missing mandatory parameters: Download_VSTS_Drop_and_Run_Script.PersonalAccessToken.**
2017-06-06T19:11:24.1769032Z    at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)
2017-06-06T19:11:24.1769032Z    at System.Management.Automation.PowerShell.Worker.ConstructPipelineAndDoWork(Runspace rs, Boolean performSyncInvoke)
2017-06-06T19:11:24.1769032Z    at System.Management.Automation.PowerShell.Worker.CreateRunspaceIfNeededAndDoWork(Runspace rsToUse, Boolean isSync)
2017-06-06T19:11:24.1769032Z    at System.Management.Automation.PowerShell.CoreInvokeHelper[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
2017-06-06T19:11:24.1769032Z    at System.Management.Automation.PowerShell.CoreInvoke[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
2017-06-06T19:11:24.1769032Z    at Microsoft.TeamFoundation.DistributedTask.Handlers.LegacyVSTSPowerShellHost.VSTSPowerShellHost.Main(String[] args)
2017-06-06T19:11:24.1869033Z ##[error]LegacyVSTSPowerShellHost.exe completed with return code: -1.
2017-06-06T19:11:24.1879035Z ##[section]Finishing: Create Azure DevTest Labs VM

Will appreciate any help in this context, also any pointer to use DevTestLab in a build definition will be great.

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62

0 Answers0