Answered by:
Microsoft.TeamFoundation.DistributedTask.Task.DevTestLabs Register-Environment Failing

Question
-
Hello,
I am having trouble creating a release definition on Azure DevOps. I believe the Register-Environment function in PowerShellOnTargetMachines.ps1 is failing:
try { $connection = Get-VssConnection -TaskContext $distributedTaskContext Write-Verbose "Starting Register-Environment cmdlet call for environment : $environmentName with filter $machineFilter" $environment = Register-Environment -EnvironmentName $environmentName -EnvironmentSpecification $environmentName -UserName $adminUserName -Password $adminPassword -WinRmProtocol $protocol -TestCertificate ($testCertificate -eq "true") -Connection $connection -TaskContext $distributedTaskContext -ResourceFilter $machineFilter Write-Verbose "Completed Register-Environment cmdlet call for environment : $environmentName" Write-Verbose "Starting Get-EnvironmentResources cmdlet call on environment name: $environmentName" $resources = Get-EnvironmentResources -Environment $environment if ($resources.Count -eq 0) { Write-Telemetry "Input_Validation" "No machine exists for given environment" throw (Get-LocalizedString -Key "No machine exists under environment: '{0}' for deployment" -ArgumentList $environmentName) } $resourcesPropertyBag = Get-ResourcesProperties -resources $resources }
With the following error (I have omitted some of my organization's information, but it is there and looks right):
2019-09-04T12:34:55.6886629Z ##[debug]VssConnection created 2019-09-04T12:34:55.7518340Z ##[debug]Starting Register-Environment cmdlet call for environment : [machine] with filter [machine] 2019-09-04T12:34:55.7843531Z ##[debug]Begin Create-Environment cmdlet 2019-09-04T12:34:55.7872731Z ##[debug]UserName=[username] 2019-09-04T12:34:55.7878292Z ##[debug]WinRmProtocol=HTTP 2019-09-04T12:34:55.7878658Z ##[debug]TestCertificate=False 2019-09-04T12:34:55.7878965Z ##[debug]Unable to create a environment object for given json - Unexpected character encountered while parsing value: A. Path '', line 0, position 0. 2019-09-04T12:34:55.7879241Z ##[debug]projectName=[projectName] 2019-09-04T12:34:55.7879517Z ##[debug]Getting environment [machine] from DTL Service 2019-09-04T12:34:55.8485808Z ##[debug]Processed: ##vso[task.logissue type=error;code={"Task_Internal_Error":Page not found.};]
And I do not know what to do. Any ideas are appreciated. Thanks for taking the time to read my question.
- Moved by SamaraSoucy-MSFTMicrosoft employee Wednesday, September 4, 2019 3:12 PM
Wednesday, September 4, 2019 12:44 PM
Answers
-
Also try asking for help over here.
https://stackoverflow.com/questions/tagged/azure-devops
Regards, Dave Patrick ....
Microsoft Certified Professional
Microsoft MVP [Windows Server] Datacenter Management
Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.- Proposed as answer by Guido Franzke Thursday, September 5, 2019 8:52 AM
- Marked as answer by Richard MuellerMVP, Banned Wednesday, September 11, 2019 12:10 PM
Wednesday, September 4, 2019 3:31 PM -
Hi Mike,
Thank you for your question! The Azure DevOps team and community are active and answering questions on https://developercommunity.visualstudio.com/spaces/21/index.html can you please post your question there instead? While the output is DevTestLabs, the Powershell cmdlet itself and error are coming from the DevOps side, so I think you will have better results asking there.
Samara
- Proposed as answer by Guido Franzke Thursday, September 5, 2019 8:52 AM
- Marked as answer by Richard MuellerMVP, Banned Wednesday, September 11, 2019 12:10 PM
Wednesday, September 4, 2019 3:12 PM
All replies
-
Hi Mike,
Thank you for your question! The Azure DevOps team and community are active and answering questions on https://developercommunity.visualstudio.com/spaces/21/index.html can you please post your question there instead? While the output is DevTestLabs, the Powershell cmdlet itself and error are coming from the DevOps side, so I think you will have better results asking there.
Samara
- Proposed as answer by Guido Franzke Thursday, September 5, 2019 8:52 AM
- Marked as answer by Richard MuellerMVP, Banned Wednesday, September 11, 2019 12:10 PM
Wednesday, September 4, 2019 3:12 PM -
Also try asking for help over here.
https://stackoverflow.com/questions/tagged/azure-devops
Regards, Dave Patrick ....
Microsoft Certified Professional
Microsoft MVP [Windows Server] Datacenter Management
Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.- Proposed as answer by Guido Franzke Thursday, September 5, 2019 8:52 AM
- Marked as answer by Richard MuellerMVP, Banned Wednesday, September 11, 2019 12:10 PM
Wednesday, September 4, 2019 3:31 PM