How to show output text as a warning?


How can I write output to the build log and have it show up as a warning (in orange)?

In PowerShell, I've tried Write-Warning, but while it does say that it's a warning, it's not displayed in orange.

1 comment
Comment actions Permalink

Hi. Assuming you are usinh]g the PowerShell runner, currently it only highlights the stderr output (in red). And Write-Warning writes only to the PowerShell warning stream. It does not generate any other output. You can vote for this feature request:

In the meantime, the following workaround is available:

Write-Host "##teamcity[message text='Your warning text' status='WARNING']"

Please find more details here:


Please sign in to leave a comment.