TeamCity Professional 2019.2.3 (build 72031)
The source for my Windows Server 2019 build agents is set to a custom AMI.
Even though build agents are created from the same AMI, they do not consistently detect PowerShell Core. I am running powershell_Core_7.0.0_x64 7.0.0 and powershell_Desktop_5.1.17763.1_x64 5.1.17763.1 on the agent.
The desktop version is always detected but core is only detected about half the time. When I notice builds not running, I notice that powershell_Core_7.0.0_x64 will not be listed in agent configuration parameters. I have to force stop the instance and keep starting instances until I finally get one that detects properly.
When this happens, I do not see any errors in the build agent log. I have also set teamcity.powershell.detector.search.paths in buildagent.properties