VMware Cloud Community
BobbyBatts
Contributor
Contributor

how can I download this table in csv file

I am in need of getting a list of ESXi versions including Version Name, Build and Build Date. I have found the information on the VMware site at : https://kb.vmware.com/s/article/2143832

Using PowerShell: $Response = Invoke-WebRequest -URI https://https://kb.vmware.com/s/article/2143832 returns an error "invoke-WebRequest unauthorized"

I am trying to get a csv file of the version table on the page.

Any suggestions?

0 Kudos
2 Replies
ShoHRock
Enthusiast
Enthusiast

did you try '-UseDefaultCredential' switch?

 

$Response = Invoke-WebRequest -URI https://kb.vmware.com/s/article/2143832 -UseDefaultCredential

0 Kudos
LucD
Leadership
Leadership

Why use that page and needing to extract the info from the HTML code?
That info is available as a JSON file, see ESXi Version Information now available as JSON (incl. Script example)

To get a CSV from that JSON file you can do

Invoke-WebRequest -Uri http://www.virten.net/repo/esxiReleases.json | 
ConvertFrom-Json |
Select -ExpandProperty data | select -ExpandProperty esxiReleases |
Export-Csv -Path .\esxiversions.csv -NoTypeInformation -UseCulture


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos