In SQL Server 2005, Microsoft replaced the familiar command-line tool Osql with Sqlcmd. Both tools perform similar functions, with subtle differences. For example, each tool can connect to a SQL Server instance for direct queries or batch job initiation. And, for my project, they can both perform the invaluable service of listing all listening SQL Server machines on the network. One of Sqlcmd’s subtle differences is that you can use the command-line option /Lc rather than just /L to derive the server list:
sqlcmd /Lc
The...