microsoft / microsoft/CSS-Exchange
[Work Item] HealthChecker + HybridAgent
@dpaulson45 is already working on this.
Since Dec 6, 2024.
- Dominant language
- PowerShell
- Stars
- 1.3k
- Forks
- 395
- Avg merge
- 14h 7m
- Merged PRs (30d)
- 5
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.