functions/internal/Write/Write-WarningEx.ps1

function Write-WarningEx{
    [CmdletBinding()]
    param(
        [parameter(Mandatory = $true, 
            ValueFromPipeline = $true)]
        [string]$MessageTemplate,
        [Parameter(Mandatory = $false)]
        [object[]]$PropertyValues
    )

    Write-Warning -Message (Get-CollapsedMessage -MessageTemplate $MessageTemplate -PropertyValues $PropertyValues)
}