I already had the link, it was in my post, and anyways, this method does not work.
For Example, my VmHost build number is 21313628 and version is 7.0.3
This does not match to anything in the table.
Here is the code I used to convert this file, which did not lead me anywhere
# Step 1 : Gather the data
$RawFile = ((Invoke-RestMethod https://packages.vmware.com/tools/versions -ErrorAction ignore) -split "`n" | ? { $_ -notmatch "^\s*#" } | ? { $_ }) -replace "`t",(" "*8)
if ($RawFile) {
$Data = $RawFile | % {
$_ += " "*100
New-Object PsObject -property ([ordered]@{
EsxVersion = $_.substring(12, 20).trim() -replace 'ESX/(.).*','$1'
EsxBuild = $_.substring(32, 20).trim()
ToolsVersion = $_.substring(52, 16).trim()
ToolsBuild = $_.substring(68).trim()
NgcVersion = $_.substring(0, 12).trim()
})
} | sort EsxVersion,EsxBuild
$Data | Export-Csv ToolsBuild.csv
} else {
$Data = import-csv ToolsBuild.csv
}
$Data | % { $_.EsxBuild = [int]$_.EsxBuild }
$Data = $Data | ? { $_.EsxBuild } | group -Property EsxVersion -AsHashTable
# Step 2 : Get the correct version based on the VmHost
$MajorVersion = $Vmhost.Version -split "\." | select -First 1
$data[$MajorVersion] | Sort-Object -Property EsxBuild | ? { ($Build - $_.EsxBuild) -ge 0 } | select -last 1 -ExpandProperty ToolsBuild