microsoft/CSS-Exchange

[Work Item] HealthChecker + HybridAgent

オープン

#2,005 opened on 2024/02/16

 (2 件のコメント) (0 件のリアクション) (1 人の担当者)PowerShell (234 件のフォーク)batch import
Health CheckerP2TriageWork Itemhelp wanted

Repository metrics

Stars
 (985 個のスター)
PR merge metrics
 (平均マージ 4d 12h) (30d で 12 merged PRs)

説明

Describe the work Trying to add functionality to check for Hybrid Agent usage in Exchange Hybrid scenario.

Additional Context So far it seems we have a few ways to check this: (Credit to Dylan Stetts) $Servers = Get-ExchangeServer | ? {$_.ServerRole -notlike "Edge"} $array = @() foreach($server in $servers) { # Installed Programs location $UninstallKey=”SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall”

# Create an instance of the Registry Object and open the HKLM 
$reg=[microsoft.win32.registrykey]::OpenRemoteBaseKey(‘LocalMachine’,$server.name) 

# Open subkeys for uninstalled programs
$regkey=$reg.OpenSubKey($UninstallKey) 

# Retrieve an array of string that contain all the subkey names
$subkeys=$regkey.GetSubKeyNames() 

# Open each Subkey and use GetValue Method & map server name & Key name
foreach($key in $subkeys){
    $thisKey=$UninstallKey+”\\”+$key 
    $thisSubKey=$reg.OpenSubKey($thisKey) 
    $obj = New-Object PSObject
    $obj | Add-Member -MemberType NoteProperty -Name “ExchangeServer” -Value $server.Name
    $obj | Add-Member -MemberType NoteProperty -Name “DisplayName” -Value $($thisSubKey.GetValue(“DisplayName”))
    $array += $obj
} 

}

$array | ? { $_.DisplayName -like "Hybrid Service"} | select ExchangeServer, DisplayName

According to our documentation we can also check this file path where the HybridAgent has been installed: *\Program Files\Microsoft Hybrid Service* https://learn.microsoft.com/en-us/exchange/hybrid-deployment/hybrid-agent#option-2-get-status-via-the-hybrid-management-powershell-module

コントリビューターガイド