SCOM 2007에서 Agent Failover 설정 (AD 통합 미 구성 시) SystemCenter2008. 11. 20. 10:39
Agent Failover를 사용하기 위해서는 AD 통합이 되어야 하는데
AD 통합이 되어 있지 않은 상태에서 Agent Failover를 구성하기 위해서는 다음 스크립트를 사용한다.
param($agentComputerName,$failoverManagementServerName)
$agent = get-agent | where {$_.PrincipalName -eq $agentComputerName}
$primaryManagementServer = $agent.GetPrimaryManagementServer();
if($primaryManagementServer -eq $null)
{
"Primary management server not found"
return
}
$failoverManagementServer = Get-ManagementServer | where {$_.PrincipalName -eq $failoverManagementServerName}
if($failoverManagementServer -eq $null)
{
"Failover management server not found"
return
}
if($failoverManagementServer.PrincipalName -eq $primaryManagementServer.PrincipalName)
{
"The failover management server cannot be the same as the primary management server"
return
}
$failoverServers = New-Object System.Collections.Generic.List``1"[[Microsoft.EnterpriseManagement.Administration.ManagementServer,Microsoft.EnterpriseManagement.OperationsManager,Version=6.0.4900.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35]]"
$failoverServers.Add($failoverManagementServer)
$agent.SetManagementServers($primaryManagementServer,$failoverServers)
== 사용 방법 ==
1. 위 스크립트를 PS1 확장자로 저장
2. OpsMgr Command Shell 실행
3. 다음과 같이 Agent의 Failover 설정
<SavedFileName>.ps1 -agentComputerName:'agent1.contoso.com' -failoverManagementServerName:'scommgmt.contoso.com'