Open
Description
When including the underscore character in any -Text value, the underscores are replaced with null space.
Example:
$PoolName = "App_Pool_01"
$SectionParams = @{
ActivityTitle = "**Application Pool Recycle**"
ActivitySubtitle = "@$env:USERNAME - $(Get-Date)"
ActivityText = "Recycled Pool: $PoolName"
SectionInput = [scriptblock] {
New-TeamsButton -Name 'View Logs' -Type OpenUri -Link 'https://some.link.com'
}
Text = "An app pool recycle of $PoolName was initiated by $env:USERNAME"
}
Send-TeamsMessage {
New-TeamsSection @SectionParams
} -Uri $Uri -Color DarkSeaGreen -MessageSummary 'Pool Recycle'
You can see in the following screenshot that it was removed the underscores from the app pool names.