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.
Start-Servicecmdlet to start SQLBrowser:
Import-Module SQLPS -DisableNameChecking #sql browser must be installed and running Start-Service "SQLBrowser"
ManagedComputerobject to get access to instances. Type the following script and run it:
$instanceName = "KERRIGAN" $managedComputer = New-Object 'Microsoft.SqlServer.Management.Smo.Wmi.ManagedComputer' $instanceName #list server instances ...