Private/Get-KadenRunningModuleVersion.ps1

function Get-KadenRunningModuleVersion {
    <#
    .SYNOPSIS
        Return the ModuleVersion of the Kaden module that is executing this call.
    .DESCRIPTION
        Reads ModuleVersion from the running module's Kaden.psd1. Does not call
        Get-Module, which can return multiple copies and stringify as "X.Y.Z X.Y.Z".
    #>

    [CmdletBinding()]
    param()

    $psd1 = Join-Path $script:KadenModuleRoot 'Kaden.psd1'
    $manifest = Import-PowerShellDataFile -Path $psd1
    return [string]$manifest.ModuleVersion
}