This is a VBScript to add a management group entry to a SCOM 2012 agent. This will add a management group entry to an existing Operations Manager 2012 agent.
In order to use it just downlaod the file.
Make sure you edit this part of the script:
This should of course reflect the management group name you want to add and the management server and the Operations Manager port you are using.
After that just invoke the script:
It will add the management group entry in a second.
You can find about the story in this blog post: Manipulating SCOM 2012 agent multihoming options by script