Listing the Central Management Servers Programmatically

Listing the Central Management Servers Programmatically

Rate This
  • Comments 1

I don't normally advocate hitting the system tables in any database with direct queries, preferring instead to use views or functions that the vendor provides. But so far I haven't been able to find the view or function that would return the list of servers in the Central Management Servers group on my "Central Management System" that I've created. Here's the query I've found so far that does the trick:

SELECT [name]
, server_name
, [description] 
FROM [msdb].[dbo].[sysmanagement_shared_registered_servers_internal]
ORDER BY server_name;
GO
Leave a Comment
  • Please add 7 and 7 and type the answer here:
  • Post