cincura.net
cincura.net

Reputation: 4150

TeamCity's build agent unable to find PowerShell

I have TC's build agent installed on Windows 2008 R2 SP1 Core. The server has PowerShell 2.0 installed (double checked, and actually from PS downloaded the TC installation). Looking at some build configuration I see these being incompatible with this agent, because powershell_x86/powershell_x64 is required. I tried deleting build agents dirs to force upgrade, but no luck. Interestingly if I provide powershell_x86, powershell_x86_Path (and for 64bit) variables into config file manually, everything runs fine.

Is there anything I can do to have the build agent find PowerShell automatically? What/where is it looking for it? Maybe the 'Core' is problem.

Upvotes: 2

Views: 2136

Answers (2)

cincura.net
cincura.net

Reputation: 4150

The problem was, that it needs both MicrosoftWindowsPowerShell (x64) and MicrosoftWindowsPowerShell-WOW64 (x86) (and dependencies), else it's not able to find it. Probably some registry mapping bitness magic in Windows.

Upvotes: 1

MrKWatkins
MrKWatkins

Reputation: 2658

Looking at the some of the source for the PowerShell plugin at http://svn.jetbrains.org/teamcity/plugins/powershell/trunk/powershell-agent/src/main/java/jetbrains/buildServer/powershell/agent/detect/PowerShellRegistry.java it mentions this page on PowerShell detection logic: http://blogs.msdn.com/b/powershell/archive/2009/06/25/detection-logic-poweshell-installation.aspx. Have a look at that page, it talks about checking the registry. Maybe you're missing some registry keys.

Upvotes: 1

Related Questions