In this recipe, we will list all SQL Server instances in the local network.
Log in to the server that has your SQL Server development instance as an administrator.
Let's look at the steps to list your SQL Server instances:
Start-Servicecmdlet to start the SQL Browser service:
Import-Module SQLPS -DisableNameChecking #out of the box, the SQLBrowser is disabled. To enable: Set-Service SQLBrowser -StartupType Automatic #sql browser must be installed and running for us #to discover SQL Server instances Start-Service "SQLBrowser"
ManagedComputerobject to get access to instances. Type the following script and run: