There are multiple ways by which we can find a list of SQL Server instances Installed on a Machine.
1. Using Command Prompt(cmd)
Whenever SQL Server is installed, there will be an entry in the Windows registry key. So we can query the registry key to find details about the instance name.
reg query "HKLM\Software\Microsoft\Microsoft SQL Server\Instance Names\SQL
2- Using PowerShell
Whatever method we did on Method 1, it can also be obtained using the PowerShell. Below is the method where we query in the registry.
Get-ItemProperty ‘HKLM:\Software\Microsoft\Microsoft SQL Server\Instance Names\SQL’
https://bit.ly/2lgLuJ1 https://bit.ly/2lAbgYW https://bit.ly/2ngU8ry