If the href in the "Acrobat Enterprise Release Notes" section of the web page, under the heading "Continuous Track Installers" is always in a "different position" you're going to have to look for it. It isn't clear in your question if you're looking for a particular href by its position in the list, or by the value found in the href.
If you, for instance, always want the 0-th (i.e., the first) href, then this will work (adjust the $PositionInList value if you want some other position). If you want to find the hrefs' value then you should be able to modify this code pretty easily to accomplish that.
There quite a few assumptions in the code regarding the structure of the HTML, but that's always a problem when you're scraping a web page. If the author change, say, the contents of each list ("li") element, the script needs adjusting!
Import-Module PowerHTML
$url = "https://www.adobe.com/devnet-docs/acrobatetk/tools/ReleaseNotesDC/"
# This is the value in $TheLink at the end of the script (at the time the script was written)
# https://www.adobe.com/devnet-docs/acrobatetk/tools/ReleaseNotesDC/continuous/dccontinuousmar2023qfe.html#dccontinuousmartwentytwentythreeqfe
$response = Invoke-WebRequest $url
$htmlDoc = ConvertFrom-Html -Content $response.Content
$PositionInList = 0 # the position in the list of "Continuous Track Installers" you want to get
$listCount = 0
$Script:hrefValue = ""
$a=$htmlDoc.SelectNodes('//div[@id="acrobat-enterprise-release-notes"]')
$descendants = $a.DescendantNodes()
$ulFound = $false
ForEach ($item in $descendants){
# search for "ul" element
if (-NOT $ulFound -AND $item.NodeType -eq 'Element' -AND $item.Name -eq "ul"){
$ulFound = $true
Continue
}
if (-NOT $ulFound){
# keep looking until the 1st 'ul' found after the 'div'
Continue
}
if ($item.NodeType -eq "Element" -and $item.Name -eq "li"){ # found a list element
if ($ListCount -eq $PositionInList){ # is it in the position wanted?
$c = $item.ChildNodes # get its childnodes (should only be 1)
if ($c.NodeType -eq "Element" -and $c.Name -eq "p"){ # is this child a "paragraph"?
$d = $c.ChildNodes # should have a single child node
if ($d.NodeType -eq "Element" -and $d.Name -eq "a"){ # and it should be an "a" (anchor)
ForEach ($e in $d.Attributes){
if ($e.Name -eq "href"){
$Script:hrefValue = $e.Value
break
}
}
}
}
}
$PositionInList++
if ($hrefValue.length -gt 0){
break
}
}
}
$TheLink = $URL + $hrefvalue