Listing the Central Management Servers Programmatically


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

Skip to main content