dbatools is a free PowerShell module with over 200 SQL Server administration, best practice and migration commands included.

Please note that documentation and command names may be out of date while we work furiously towards 1.0


This command gets a list of SQL Server names stored in SQL Server Central Management Server as a simple array.


Get a list of all server names from the Central Management Server on sqlserver2014a, using SQL Authentication


Gets a list of server names in the HR and Accounting groups from the Central Management Server on sqlserver2014a.


Find databases on Development and Production servers that aren’t online. Some commands don’t accept pipeline input, but for those that do, this is very powerful.





From PowerShell, execute Get-Help Get-DbaRegisteredServerName -Detailed for more information on this function.

Source Code

Want to see the source code? View Get-DbaRegisteredServerName.ps1 on GitHub

Related commands