How do you discover all of the different SQL Server instances on your network? We'd like to think we know our inventory, and are managing it well, but... Different developers, different software installations, or just different days of the week. :-) There are often new instances popping up on the network. I believe this is called 'SQL Server Sprawl', where large numbers of SQL Server instances are installed in the domain, many of which are not needed, not managed... and very often not licensed. But that's another story.
Anyway, how do you discover all of the different SQL Server instances on the network? SQL Ping, the MSFT Assessment and Planning Toolkit, Powershell, OSQL, and many more. I'm wiling to bet this post is one of the fastest and easiest ways to do the deed.
Open a CMD prompt, maneuver to whatever directory you choose, and type the following:
SQLCMD -L >SQLservers.txt
Press ENTER.
That's it. Seconds later (depending on how big your network is), you've output all discovered SQL Server instances on your network to the targeted .txt file.
It's that easy.
Short and sweet... leaving you all kinds of time to cleanup that SQL Server Sprawl.
Take a look at this for more details on the sqlcmd utility:
https://msdn.microsoft.com/en-us/library/ms162773.aspx