I know that one can output messages to TeamCity build logs via specially decorated Write-Host:
write-host "##teamcity[message text='Prepearing backup folder']"
What if I need the message to contain a value of a variable as well.
I've tried the following:
$myFullMessage = "Perpearing backup folder at: " + $path
write-host "##teamcity[message text=$myFullMessage]"
But I get an error in an output stating that the message parameter provided should start with ' character.
Please let me know if I can output messages with variable value part in message body.