troubleshooting Question

SCOM rehome agents to another management server via powershell?

Avatar of snyderkv
snyderkv asked on
* System Center Operations Manager (SCOM)Microsoft Applications
2 Comments1 Solution609 ViewsLast Modified:
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"}
ASKER CERTIFIED SOLUTION
David Johnson, CD
The More I know, the more I don't know
Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros