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?
did you try '-UseDefaultCredential' switch?
$Response = Invoke-WebRequest -URI https://kb.vmware.com/s/article/2143832 -UseDefaultCredential
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