• If you want to script out the linked server definitions, here is a powershell script that will accomplish this.

    Add-PSSnapin SqlServerProviderSnapin100

    Add-PSSnapin SqlServerCmdletSnapin100

    $server="<servername>"

    $scriptpath="<path of script file>"

    cd SQLSERVER:\SQL\$server\DEFAULT\LinkedServers

    $Scripter=new-object ("Microsoft.SqlServer.Management.Smo.Scripter") ($server)

    $Scripter.Options.DriAll=$True

    $Scripter.Options.IncludeHeaders=$True

    $Scripter.Options.ToFileOnly=$True

    $Scripter.Options.WithDependencies=$False

    foreach ($Item in Get-ChildItem) {

    $filename = $Item.ToString()

    $filename = $filename.Replace("\","_")

    $Scripter.Options.FileName=$scriptpath+$filename + ".sql"

    $Scripter.Options.AppendToFile=$False

    $Scripter.Options.ScriptDrops=$True;

    $Scripter.Options.IncludeIfNotExists=$True;

    $Scripter.Script($Item)

    $Scripter.Options.ScriptDrops=$False;

    $Scripter.Options.IncludeIfNotExists=$False;

    $Scripter.Options.AppendToFile=$True

    $Scripter.Script($Item)

    }

    Bob
    -----------------------------------------------------------------------------
    How to post to get the best help[/url]