Many a times we are required to find SQL Server installations across local network. This blog provides a script to find all SQL Servers on network using SQLCMD. It’s a very simple script and is given below.
Open up command prompt and type below command
This will list down all SQLCMD options as shown in below image.
The highlighted option –L can be used to lists network servers. Let’s execute the same.