Azure DevOps: Colorful logs from PowerShell output

My colleague Oleksandr Nikolaev has found out how to add colors to the PowerShell logs on Azure DevOps. In addition to this, it is also possible to make log groupings.

Please find examples below:

Write-Host "##[group]Beginning of a group"
Write-Host "##[warning]Warning message"
Write-Host "##[error]Error message"
Write-Host "##[debug]Debug text"
Write-Host "##[command]Command-line being run"
Write-Host "##[endgroup]"
Colors
Groupping

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.