function Update-PSVersionData

    Updates mapping table used by Get-PSVersion
    Updates mapping table used by Get-PSVersion, a function to map information from $PSVersionTable in order to retrieve friendly names for Windows PowerShell build numbers
    The Uri to download PowerShell version information from.
     Update-PSVersionData -Verbose
     Update-PSVersionData -Uri ''
    Author: Jan Egil Ring
    Twitter: @JanEgilRing

    param (
        [Parameter(Mandatory = $false,
            ValueFromPipeline = $true,
            ValueFromPipelineByPropertyName = $true)]
        [string]$Uri = ''

    if ($IsLinux)
        $DestinationFile = Join-Path -Path "$($home)/.config" -ChildPath 'PSVersionMappingTable.json'
        $DestinationFile = Join-Path -Path $env:LOCALAPPDATA\Microsoft\Windows\PowerShell -ChildPath 'PSVersionMappingTable.json'


        Write-Verbose -Message "Trying to download $Uri using Invoke-WebRequest..."

        Invoke-WebRequest -Uri $Uri -OutFile $DestinationFile -ErrorAction Stop

        Write-Verbose -Message "$Uri successfully downloaded to $DestinationFile"

        Write-Verbose -Message "PSVersionData was updated successfully"



        throw "An error occured while trying to download $Uri to $DestinationFile, exception: $($_.Exception)"