I've seen lots of PoSH scripts that do this, but unfortunately, not everyone knows PoSH, or is uncomfortable using it. This is a simple SQL script to add a server to an existing Group in your Central Management Server. We have made this a discreet step in our server provisioning process.
Here is the listing of user-modifiable variables:
The "magic" is a procedure that MS has graciously provided us that does all of the heavy-lifting:
This can certainly be improved upon. One simple thing to make it more robust would be to allow it to add new groups or validate groups being passed in. I'll let that as an exercise for the reader.