I'm generating a Slack message using a hashtable in Powershell.
Here is how the hashtable is generated:
$serviceitems = foreach ($r in $rows) {
@{
type = 'section'
text = @{
type = 'mrkdwn'
text = "*{0}*\n{1:C2}" -f $r[1], $r[0]
}
}
@{
type = 'divider'
}
}
The messsages show up in Slack but the \n
prints out instead of going to a new line like it should. The two *
make the text bold as intended. I tried adding a backtick to before \n
and also tried adding an extra \
. Both made no change.