Get-ReleaseUrlForWinx64.ps1

function Get-ReleaseUrlForWinx64
{
  param
  (
    [string]
    [Parameter(Mandatory,ValueFromPipeline)]
    $Url
  )
  
  begin
  {
    $platform = "win-x64.zip"
    $static = "https://github.com/PowerShell/PowerShell/releases/download"
  }
  process
  {
    $v = ($URL -split '/v')[-1]
    "$static/v$v/PowerShell-$v-$platform"
  }
}