Skip to content

-Text strings ignore '_' underscore character. #30

Open
@TechDufus

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.

image

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestpr welcomeWould be great if someone did PR

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions