Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions WHFBCHECKS/private/Get-WHFBAACCurrentVersion.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ This will query the Docs page for the latest version of AAD Connect

.DESCRIPTION

This function will query this address: https://raw.githubusercontent.com/MicrosoftDocs/azure-docs/main/articles/active-directory/hybrid/connect/reference-connect-version-history.md and perform a regex to return the list of all supported versions of AAD Connect.
This function will query this address: https://raw.githubusercontent.com/MicrosoftDocs/entra-docs/main/docs/identity/hybrid/connect/reference-connect-version-history.md and perform a regex to return the list of all supported versions of AAD Connect.
#>
function Get-WHFBAACCurrentVersion {
$regex = [regex] "## ((?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)"
$AADConnectRelWR = Invoke-RestMethod -Method Get -Uri "https://raw.githubusercontent.com/MicrosoftDocs/azure-docs/main/articles/active-directory/hybrid/connect/reference-connect-version-history.md" -UseBasicParsing
$AADConnectRelWR = Invoke-RestMethod -Method Get -Uri "https://raw.githubusercontent.com/MicrosoftDocs/entra-docs/main/docs/identity/hybrid/connect/reference-connect-version-history.md" -UseBasicParsing
[version[]]$AADConnectReleases = $regex.matches(($AADConnectRelWR.split("\n\r"))).value | ForEach-Object {$_.trim("## ")}
[version[]]$AADConnectReleases = $AADConnectReleases | Sort-Object -Descending -Unique
return [string[]]$AADConnectReleases
Expand Down