Private/Get-KadenInstructionBodyText.ps1

function Get-KadenInstructionBodyText {
    <#
    .SYNOPSIS
        Read an installed instruction body with LF newlines.
    #>

    [CmdletBinding()]
    param(
        [Parameter(Mandatory = $true)]
        [string]$LiteralPath
    )

    if (-not (Test-Path -LiteralPath $LiteralPath)) {
        throw "KDN-INSTRUCTION-BLOCK-MISSING: installed instruction block is missing ('$LiteralPath')."
    }
    $text = [System.IO.File]::ReadAllText($LiteralPath)
    $text = $text -replace "`r`n", "`n" -replace "`r", "`n"
    if (-not $text.EndsWith("`n")) {
        $text += "`n"
    }
    return $text
}