1
votes

I'm trying to set up teamcity and have come across a problem when adding a powershell build step. I am getting the following error when trying to run the build, however if I remove this build step the build runs.

"Warning: No enabled compatible agents for this build configuration. Please register a build agent or tweak build configuration requirements."

Below is a screen shot of the build step configuration. If anyone has any ideas how to fix this please let me know.

Thanks

enter image description here

2
This has little to do with PowerShell, but rather how you set up your build agents (if any). Build jobs may require certain capabilities of an agent and if no agent has them, then the job cannot run. I'm unfamiliar with TeamCity here, but that's how it works in many other similar tools. You may need to read the documentation.Joey

2 Answers

1
votes

Inside your configuration, on the left panel, you have a submenu: Agent Requirements.

Inside it, you have all Build Steps Requirements. In your case, you should have:

  • Parameter Name: powershell_x86
  • Condition: exists

Then, bellow this block you can see the Agents compatibility. In your case, your agent seems to be on the right side, under the Uncompatible agents with unmet requirement: powershell_x86 exists.

You should ensure that there is no errors. Click on your agent, and on Agent Parameters tab, Configuration Parameters sub tab, you should see :

  • powershell_x86: 5.0
  • powershell_x86_path: C:\Windows\SysWOW64\WindowsPowerShell\v1.0

If it doesn't appears, then, powershell is not installed. Or you have installed it after starting your agent. In this case, just restart your service agent after installing powershell.

0
votes

There may be two reasons :

  1. Check PowerShell is installed on machine where TeamCity server or Agent is installed
  2. If PowerShell is there then check TeamCity Agent is running under System profile or under particular user account

This is occures when particular software is not installed on the TeamCity Agent server