Sql Server Server Group query
If you right click the registered servers group and select "New Query" you get a query window that connects to all the servers, whatever you execute will run on all and return combined results.

http://msdn.microsoft.com/en-us/library/bb964743.aspx

If you want to programatically do it, you can use a central management server and query that for a list of servers, and use linked servers to run the query at each location using openquery

http://sqltidbits.com/scripts/query-central-management-server-list