Skip to content

Instantly share code, notes, and snippets.

@MagicAndi
Created February 5, 2015 09:42
Show Gist options
  • Save MagicAndi/ec3f43d70aa4b731114d to your computer and use it in GitHub Desktop.
Save MagicAndi/ec3f43d70aa4b731114d to your computer and use it in GitHub Desktop.
PowerShell one-liner to discover all SQL Server instances running on network. Requires SQL Browser service to be running, as described in http://www.mssqltips.com/sqlservertip/2013/find-sql-server-instances-across-your-network-using-windows-powershell/
[System.Data.Sql.SqlDataSourceEnumerator]::Instance.GetDataSources()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment