Hi,
Sorry for missing this thread. I'm afraid that this cannot be done with the existing one. My thoughts is to deploy a script to all the managed Windows agents (via group policy or other management tool, such as configuraion manager) to add the new management group (multi-homed).
Here's the script for your reference (just illustrate how it works and you may need to modify it to cater for the real environment)
$mma1 = New-Object -ComObject 'AgentConfigManager.MgmtSvcCfg'
#$computers = import-csv c:\temp\computer_list.csv
#check if the new management group already exists
$p = $mma1.GetManagementGroup("test01")
#if it does not exist, then check the criteria and add the new management group if the condition is met.
if ($p -eq $null)
{
$agent_version = (Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Microsoft Operations Manager\3.0\setup" -ea silentlycontinue).AgentVersion
#for debugging
$agent_version
[environment]::OSVersion.Version.major
[environment]::OSVersion.Version.major -ge 6 -and $agent_version -like '10.*'
if ([environment]::OSVersion.Version.major -ge 6 -and $agent_version -like '10.*')
# server 2012/2012r2: 6
# server 2016/2019: 10
{
$mma1.AddManagementGroup('test01' , 'om16.sc.com' , 5723)
write-host "management group test01 was added!"
$mma1.ReloadConfiguration()
}
}
else
{
"test01 already exists!"
}
before running the script
script runing
after running the script
Alex
If the response is helpful, please click "Accept Answer" and upvote it.