Trying to fetch the table of content using h3 tag.
link- https://learn.microsoft.com/en-us/troubleshoot/sql/releases/download-and-install-latest-updates
Trying to fetch the whole table of 'SQL Server 2019'. and convrting into json object in powershell.
| Build number or version | Service pack | Update | ..
| 15.0.4298.1 | None | CU19 | ..
| 15.0.4280.7 | None | CU18 + GDR | ..
...
...........................Tried this
` Send a request to the URL and get the HTML content using basic parsing
$response = Invoke-WebRequest -Uri "https://learn.microsoft.com/en-us/troubleshoot/sql/releases/download-and-install-latest-updates" -UseBasicParsing
$response = $response.content
"Find the table which has an h3 tag containing "sql-server-2017""
$table = ($response.ParsedHtml).getElementsByTagName("h3") | Where-Object {$_.innerText -eq "SQL Server 2017"} | Select-Object -ExpandProperty parentNode | Select-Object -ExpandProperty nextSibling
Print the table content
Write-Output $table.outerHTML
but not working