commands

^

New-DbaEndpoint

Author Chrissy LeMaire (@cl), netnerds.net
Availability Windows, Linux, macOS

 

Synopsis

Creates endpoints on a SQL Server instance.

Description

Creates endpoints on a SQL Server instance.

Syntax

New-DbaEndpoint
    [-SqlInstance] <DbaInstanceParameter[]>
    [[-SqlCredential] <PSCredential>]
    [[-Name] <String>]
    [[-Type] <String>]
    [[-Protocol] <String>]
    [[-Role] <String>]
    [[-EndpointEncryption] <String>]
    [[-EncryptionAlgorithm] <String>]
    [[-Certificate] <String>]
    [[-IPAddress] <IPAddress>]
    [[-Port] <Int32>]
    [[-SslPort] <Int32>]
    [[-Owner] <String>]
    [-EnableException]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

 

Examples

 

Example: 1
PS C:\> New-DbaEndpoint -SqlInstance localhost\sql2017 -Type DatabaseMirroring

Creates a database mirroring endpoint on localhost\sql2017 which using the default port

Example: 2
PS C:\> New-DbaEndpoint -SqlInstance localhost\sql2017 -Type DatabaseMirroring -Port 5055

Creates a database mirroring endpoint on localhost\sql2017 which uses alternative port 5055

Example: 3
PS C:\> New-DbaEndpoint -SqlInstance localhost\sql2017 -Type DatabaseMirroring -IPAddress 192.168.0.15 -Port 5055

Creates a database mirroring endpoint on localhost\sql2017 which binds only on ipaddress 192.168.0.15 and port 5055

Required Parameters

-SqlInstance

The target SQL Server instance or instances.

Alias
Required True
Pipeline true (ByValue)
Default Value

Optional Parameters

-SqlCredential

Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.

Alias
Required False
Pipeline false
Default Value
-Name

The name of the endpoint. Defaults to hadr_endpoint if type is DatabaseMirroring, has to be provided for other types.

Alias Endpoint
Required False
Pipeline false
Default Value
-Type

The type of endpoint. Defaults to DatabaseMirroring. Options: DatabaseMirroring, ServiceBroker, Soap, TSql

Alias
Required False
Pipeline false
Default Value DatabaseMirroring
Accepted Values DatabaseMirroring,ServiceBroker,Soap,TSql
-Protocol

The type of protocol. Defaults to tcp. Options: Tcp, NamedPipes, Http, Via, SharedMemory

Alias
Required False
Pipeline false
Default Value Tcp
Accepted Values Tcp,NamedPipes,Http,Via,SharedMemory
-Role

The type of role. Defaults to All. Options: All, None, Partner, Witness

Alias
Required False
Pipeline false
Default Value All
Accepted Values All,None,Partner,Witness
-EndpointEncryption

Used to specify the state of encryption on the endpoint. Defaults to required. Disabled Required Supported

Alias
Required False
Pipeline false
Default Value Required
Accepted Values Disabled,Required,Supported
-EncryptionAlgorithm

Specifies an encryption algorithm used on an endpoint. Defaults to Aes. Options are: AesRC4 Aes None RC4 RC4Aes

Alias
Required False
Pipeline false
Default Value Aes
Accepted Values Aes,AesRC4,None,RC4,RC4Aes
-Certificate

Database certificate used for authentication.

Alias
Required False
Pipeline false
Default Value
-IPAddress

Specifies the IP address that the endpoint will listen on. The default is ALL. This means that the listener will accept a connection on any valid IP address. Currently only IPv4 is supported by this command.

Alias
Required False
Pipeline false
Default Value 0.0.0.0
-Port

Port for TCP. If one is not provided, it will be auto-generated.

Alias
Required False
Pipeline false
Default Value 0
-SslPort

Port for SSL.

Alias
Required False
Pipeline false
Default Value 0
-Owner

Owner of the endpoint. Defaults to sa.

Alias
Required False
Pipeline false
Default Value
-EnableException

By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.

Alias
Required False
Pipeline false
Default Value False
-WhatIf

Shows what would happen if the command were to run. No actions are actually performed.

Alias wi
Required False
Pipeline false
Default Value
-Confirm

Prompts you for confirmation before executing any changing operations within the command.

Alias cf
Required False
Pipeline false
Default Value

 

Want to see the source code for this command? Check out New-DbaEndpoint on GitHub.
Want to see the Bill Of Health for this command? Check out New-DbaEndpoint.