Home Forums Programming Powershell Script to loop through SQL Server Instances and pass Instance Name to Connection String RE: Script to loop through SQL Server Instances and pass Instance Name to Connection String

  • If you get-member in get-sqldata you will see that it returns a System.Data.DataRow and the properties related to your query. This is what you need to use :

    In you query,the name of the Instance is InstanceName rigth ?

    Change you script to :

    $myserver = $_.InstanceName

    and will work 🙂

    $hell your Experience !!![/url]