Provide Version Number
22.07.11.0407
Describe the issue
When running the DCCoreRatio report, the script only detects and reviews the core ratio against a single discovered Domain Controller in the AD Site.
Expected behavior
Expected behavior is that the report detects all relevant DomainControllers in the AD site and then determines DC Core Ratio
Script Output
n/a
Additional context
When reviewing the script code, the Get-ExchangeDCCoreRatio function has an incorrect Get-ADDomainController filter and the return is always only 1/an available domaincontroller instead of ALL domaincontrollers in the AD site.
Current Code:
$ADSite = [System.DirectoryServices.ActiveDirectory.ActiveDirectorySite]::GetComputerSite().Name [array]$DomainControllers = (Get-ADForest).Domains | ForEach-Object { Get-ADDomainController -Server $_ } | Where-Object { $_.IsGlobalCatalog -eq $true -and $_.Site -eq $ADSite }
Optimized Filtering (as seen in HealthChecker.ps version 21.08.05.0853)
$ADSite = [System.DirectoryServices.ActiveDirectory.ActiveDirectorySite]::GetComputerSite().Name [array]$DomainControllers = (Get-ADForest).Domains | ForEach-Object { Get-ADDomainController -Filter { isGlobalCatalog -eq $true -and Site -eq $ADSite } -Server $_ }
Provide Version Number
22.07.11.0407
Describe the issue
When running the DCCoreRatio report, the script only detects and reviews the core ratio against a single discovered Domain Controller in the AD Site.
Expected behavior
Expected behavior is that the report detects all relevant DomainControllers in the AD site and then determines DC Core Ratio
Script Output
n/a
Additional context
When reviewing the script code, the Get-ExchangeDCCoreRatio function has an incorrect Get-ADDomainController filter and the return is always only 1/an available domaincontroller instead of ALL domaincontrollers in the AD site.
Current Code:
$ADSite = [System.DirectoryServices.ActiveDirectory.ActiveDirectorySite]::GetComputerSite().Name [array]$DomainControllers = (Get-ADForest).Domains | ForEach-Object { Get-ADDomainController -Server $_ } | Where-Object { $_.IsGlobalCatalog -eq $true -and $_.Site -eq $ADSite }Optimized Filtering (as seen in HealthChecker.ps version 21.08.05.0853)
$ADSite = [System.DirectoryServices.ActiveDirectory.ActiveDirectorySite]::GetComputerSite().Name [array]$DomainControllers = (Get-ADForest).Domains | ForEach-Object { Get-ADDomainController -Filter { isGlobalCatalog -eq $true -and Site -eq $ADSite } -Server $_ }