Home Forums Programming Powershell Register SQL Server instances in MS. RE: Register SQL Server instances in MS.

  • I have the SQL 2008 client loaded so this is a simple method using SQLPS but it is the basis of what I use:

    cd 'SQLSERVER:\sqlregistration\Database Engine Server Group'

    new-item ServerGroupA #tcreate a group for servers

    cd ServerGroupA # sets location in the group just created

    Get-Content C:\ServerList.Txt | foreach {New-Item $_ -itemtype registration -Value "server=$_ ; integrated security=true" }

    MG

    "There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies."
    Tony Hoare

    "If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.