How to get list of SQL servers on the network

Kranthi DBA 221 Reputation points

I want to know the list of SQL services installed on the network.

Note: On some of the servers browser service is disabled state due to which I am unable to get information using the powershell scripts.

Please advise if there is any work around which I can use to overcome this issue.

Thanks in advance!

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,657 questions
0 comments No comments
{count} votes

Accepted answer
  1. Ben Miller (DBAduck) 951 Reputation points

    There are a couple of ways to do this.

    One of the most effective is to use the MAP toolkit from Microsoft.

    This allows you to get all the services that are on all machines in the Active Directory list of computers. This requires Domain Admin privileges, but it will even find instances of SQL that are offline.

    One other quick and dirty ways is to use sqlcmd. If you use sqlcmd -L and it will do it's best to find them.

    And another is to use PowerShell and have a list of servers. The command is Get-Service -ComputerName @(comma separated list of computers) -name mssql* . This requires a little more knowledge of the computers, but it is effective as long as you have Domain Admin privileges or at least admin on the machine so that you can get at the services.

    I will tell you that the MAP toolkit (Microsoft Assessment and Planning toolkit) is the most comprehensive because it can scan the computers list in AD and get to every machine that is not turned off and get you a list of the services on that server without regard to it being online.

    1 person found this answer helpful.

2 additional answers

Sort by: Most helpful
  1. Cris Zhan-MSFT 6,601 Reputation points

    Hi KranthiDBA-1529,

    Consider that not all servers will always enable the Browser service. I think the Microsoft Assessment and Planning(MAP) toolkit is the most suitable.

    Check the article to use Microsoft Assessment and Planning (MAP) Toolkit. Generate report will be able to view detailed information about SQL Server Assessment and the Database details.

    0 comments No comments

  2. Olaf Helper 40,656 Reputation points

    Example for an advanced PowerShell script to fetch the informations: Create Inventory of SQL Server in Network as Html