6
votes

I have successfully installed a new VSTS agent on a new Azure VM - Windows Server 2012 R2 (64bit). When I am try to execute any pipelines containing azure powershell tasks on the new vsts agent, I get an error message :-

Error message 'No agent found in pool BuildAgent2 which satisfies the specified demands:azureps Agent.Version -gtVersion 2.119.1'

Is there any way to add AzurePS as a system capability ? Please advise on the steps to do this - thanks.

1
You may need to install all kinds of 3rd party tools and then restart the agent for it to detect the capability. docs.microsoft.com/en-us/powershell/azure/…jessehouwing
I would recommend looking at Microsoft's packer images for their Windows build machines as a starting point: github.com/microsoft/azure-pipelines-image-generationDaniel Mann

1 Answers

5
votes

AzurePS System capability is not available on a newly installed vsts-agent

Agree with jessehouwing.

If you want to enable AzurePS System capability, you could install the PowerShell 5.1 or higher on Windows, or PowerShell Core 6.x and later on all platforms, then install/update the Azure PowerShell module on the Azure VM:

Install the Azure PowerShell module

But the error you got should more related to the demands you set on the option tab of your build :

enter image description here

Check the agent version you have installed, make sure you set the correct version, or you can try to remove that demands to check if you still have this issue.

Hope this helps.