SCOM rehome agents to another management server via powershell?
EE,
I have an issue where a management server keeps crashing and we need to get the agents off.
I'm trying to do it with an article from 2007 but I'm running 2012R2 and the commands are different.
Can someone assist?
$serverfrom = Get-ManagementServer | ? {$_.name -eq "FQDN of the Server you are moving the agents from"}
$agents = Get-Agent -ManagementServer $serverfrom
$serverto = Get-ManagementServer | ? {$_.name -eq "FQDN of the Server you are moving the agents to"}
Set-ManagementServer -AgentManagedComputer:$agents -PrimaryManagementServer:$serverto
$agent = Get-Agent -ManagementServer $serverfrom | ? {$_.name -eq "FQDN of the agent"}
* System Center Operations Manager (SCOM)Microsoft Applications