curl is not recognized as an internal or external command while running the Teamcity command line script. Curl is installed in local and works fine in command prompt.
Build log Result :
[20:05:35]Step 2/2: Command Line
[20:05:35][Step 2/2] Starting: C:\BuildAgent\temp\agentTmp\custom_script7047202395618427524.cmd
[20:05:35][Step 2/2] in directory: C:\BuildAgent\work\376652cbd18bb804
[20:05:35][Step 2/2] 'curl' is not recognized as an internal or external command,
[20:05:35][Step 2/2] operable program or batch file.
[20:05:35][Step 2/2] Process exited with code 1
[20:05:35][Step 2/2] Step Command Line failed
curl command
curl -v --request PUT %teamcity.serverUrl%/httpAuth/app/rest/builds/id:%teamcity.build.id%/pin
-u admin:admin