Getting error while Assigning failover Management server to SCOM Agents

Arpita Dhawan 21 Reputation points
2024-03-28T12:14:16.21+00:00

Hi All,

I want to set failover SCOM Management Server to a few SCOM agents with the powershell queries, but its showing this below error:-

failover error

So Below steps i have used to set failover MS

  1. I have created a text file with the multiple scom agent.
  2. $Agents = Get-Content -Path "C:\Temp\agentlist.txt"
  3. $MSName02 = 'MY Failover Management Server'
  4. $MS02 = Get-SCOMManagementServer | where {$_.Name -eq $MSName02}
  5. Set-SCOMParentManagementServer -Agent $Agent -FailoverServer $MS02

So the error seems unable to convert value of "System.String" to type "Microsoft.EnterpriseManagement.Administration.AgentManagedComputer".

I think i am doing something wrong in adding the scom agent to text files.not sure.

Please suggest here!!

Operations Manager
Operations Manager
A family of System Center products that provide infrastructure monitoring, help ensure the predictable performance and availability of vital applications, and offer comprehensive monitoring for datacenters and cloud, both private and public.
1,413 questions
Microsoft System Center
Microsoft System Center
A suite of Microsoft systems management products that offer solutions for managing datacenter resources, private clouds, and client devices.
829 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. XinGuo-MSFT 14,386 Reputation points
    2024-03-29T07:15:39.38+00:00

    Hi,

    Modifies the primary and failover management servers for an agent or gateway management server, please refer to this article:

    Example 1: Set the primary and failover management servers

    0 comments No comments