Problem:
I tried to run SQLCMD -L to list all of the SQL Server instances on the Windows 8.1 (x64) PC.
C:\Users\xxx>sqlcmd -L
Surprisingly, it does not work as expected. Instead, it returns:
Servers:
;UID:Login ID=?;PWD:Password=?;Trusted_Connection:Use Integrated Security=?;*APP:AppName=?;*WSID:WorkStation ID=?;
But when I ran the same command on the Windows 7(x64) PC, it correctly lists all of the SQL Server instances on the machine.
I tried to do the same thing with the following PowerShell command, it works fine.
(get-itemproperty 'HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server').InstalledInstances
Update:
It works fine on Windows 10 Professional. See below:
Reason:
???