Private/Get-UserEnvironmentVariable.ps1

function Get-UserEnvironmentVariable {
    [CmdletBinding()]
    param(
        [Parameter(Mandatory = $true)]
        [string] $Name
    )

    return (Get-ItemProperty -Path 'HKCU:\Environment').$Name
}