Servers in a domain

  • Does this code create the list of servers available within a domain ?

    System.Data.Sql.SqlDataSourceEnumerator]::Instance.GetDataSources() | SELECT ServerName | Format-Table -HideTableHeaders >> C:\INSERTFoundSQLServers.txt​

  • sqlnewbie17 (5/11/2016)


    Does this code create the list of servers available within a domain ?

    System.Data.Sql.SqlDataSourceEnumerator]::Instance.GetDataSources() | SELECT ServerName | Format-Table -HideTableHeaders >> C:\INSERTFoundSQLServers.txt?

    If SQL Server Browser is running, and the machine you are running it from has network access to every machine/server on the network within that domain....yes it should.

    However, it is not a guarantee you will find all the servers using just that running SQL Server. Another method I have used is to search Active Directory for SQL Server SPNs, but again not guarantee.

    Shawn Melton
    Twitter: @wsmelton
    Blog: wsmelton.github.com
    Github: wsmelton

  • Then is there a foolproof waay of finding all the windows servers/or sql instances within in a domain using powershell/or any process.

    I tried the above process but my list did not match with the Windows admin team's list.

    Any suggestions please.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply