There are a couple of ways to do this.
One of the most effective is to use the MAP toolkit from Microsoft. 1640.microsoft-assessment-and-planning-map-toolkit-getting-started.aspx
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.
You can get the list of computers from the ActiveDirectory module (install RSAT tools for Active Directory)