Check Existence of Server and find Instance Type

  • SQL_Hunt

    SSC-Dedicated

    Points: 33453

    Comments posted to this topic are about the item Check Existence of Server and find Instance Type

    Thanks.

  • SQL_Hunt

    SSC-Dedicated

    Points: 33453

    Before the syntax :-

    $serverObject = New-Object Microsoft.SqlServer.Management.Smo.Server($instance)

    You can add including the below syntax to load the SMO component DLL.

    Add-Type -Path "C:\Program Files\Microsoft SQL Server\110\SDK\Assemblies\Microsoft.SqlServer.Smo.dll"

    Thanks.

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

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