Here’s how to find the name of all SQL Express instances installed on a computer. To get a lsit of SQL Express instance names, run this command in an elevated command prompt:
SQLCMD -L
Alternatively, run this command:
osql -L
❗ Note: You must use a capital L for the command line switch!
It takes about a minute to run and will return a list of all SQL Express instances installed on the computer.