Server.Endpoints Server.Endpoints Server.Endpoints Property

Definition

Represents a collection of Endpoint objects. Each Endpoint object represents an endpoint defined on the instance of SQL Server.

public:
 property Microsoft::SqlServer::Management::Smo::EndpointCollection ^ Endpoints { Microsoft::SqlServer::Management::Smo::EndpointCollection ^ get(); };
[Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcObject(Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcContainerRelationship.ObjectContainer, Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcContainerCardinality.ZeroToAny, typeof(Microsoft.SqlServer.Management.Smo.Endpoint))]
public Microsoft.SqlServer.Management.Smo.EndpointCollection Endpoints { get; }
Public ReadOnly Property Endpoints As EndpointCollection
Property Value

An EndpointCollection object that represents all the endpoints defined on the instance of SQL Server.

Examples

Visual Basic

PowerShell

$srv = new-object Microsoft.SqlServer.Management.Smo.Server("(local)")  
$ep = new-object Microsoft.SqlServer.Management.Smo.Endpoint($srv, "Mirroring Endpoint")  
$ep.ProtocolType = [Microsoft.SqlServer.Management.Smo.ProtocolType]::Tcp  
$ep.EndpointType = [Microsoft.SqlServer.Management.Smo.EndpointType]::DatabaseMirroring  
$ep.Protocol.Http.SslPort = 5024  
$ep.Protocol.Tcp.ListenerPort = 6666  
$ep.Payload.DatabaseMirroring.ServerMirroringRole = [Microsoft.SqlServer.Management.Smo.ServerMirroringRole]::All  
$ep.Create()  
$ep.Start()  
Write-Host $ep.EndpointState  

Remarks

The Endpoint class is used to manage connections over the network for SQL Server services. These include database mirroring, SQL Server, Transact-SQL, and SOAP requests. These are also referred to as the payload types.

Applies to