Add/Remove a Management group from a SCOM 2012 agent with script

Two very useful scripts if you multi-home SCOM agents provided by Bob Cornelissen: