Change font color in powershell output?

I tried script like this but the font color in Ocotpus console is still default:

write-host “Hello world!” -foregroundcolor “magenta”

How do you change the text color for a given line in the Octopus console output?

1 Like


Thanks for getting in touch! The colors supported by Write-Host only apply to the windows console so we are not able to record them. There are also other properties of Write-Host such as text wrapping that can make logs difficult to read. We recommend you look into using Write-Output as an alternative to Write-Host. It’s also worth noting that Octopus Deploy logs are just pain text logs so we don’t support any custom formatting at this time.

Let me know if there’s anything else I can help with.