Set-SqlHadrEndpoint

Sets the properties of an existing database mirroring endpoint.
Set-SqlHadrEndpoint [[-Path] <string>] [-AuthenticationOrder <EndpointAuthenticationOrder>] [-Certificate<string>] [-Encryption <EndpointEncryption>] [-EncryptionAlgorithm <EndpointEncryptionAlgorithm>] [-IpAddress<IPAddress>] [-Owner <string>] [-Port <int>] [-Script] [-State <EndpointState>] [-Confirm] [-WhatIf][<CommonParameters>]
Set-SqlHadrEndpoint [-InputObject*] <Endpoint> [-AuthenticationOrder <EndpointAuthenticationOrder>] [-Certificate<string>] [-Encryption <EndpointEncryption>] [-EncryptionAlgorithm <EndpointEncryptionAlgorithm>] [-IpAddress<IPAddress>] [-Owner <string>] [-Port <int>] [-Script] [-State <EndpointState>] [-Confirm] [-WhatIf][<CommonParameters>]

The Set-SqlHadrEndpoint cmdlet allows one to change the properties of an existing database mirroring endpoint (the name, state, authentication properties, and so forth).

Parameters
-AuthenticationOrder <EndpointAuthenticationOrder>

  • Default value is SMO.EndpointAuthenticationOrder.Negotiate

The order and type of authentication that is used by the endpoint. The options are Certificate, CertificateKerberos , CertificateNegotiate, CertificateNtlm, Kerberos, KerberosCertificate, Negotiate, NegotiateCertificate, Ntlm, and NtlmCertificate. If the specified option calls for a certificate, the -Certificate parameter must also be set, unless a certificate is already associated with the endpoint.

-Certificate <string>

The name of the certificate the endpoint should use to authenticate connections. The far endpoint must have a certificate with the public key matching the private key of the specified certificate.

-Encryption <EndpointEncryption>

  • Default value is SMO.EndpointAuthentication.Required

The endpoint encryption setting. The options are Disabled, Supported, or Required.

-EncryptionAlgorithm <EndpointEncryptionAlgorithm>

  • Default value is RC4

The form of encryption used by the endpoint. The options are Aes, AesRC4, None, RC4, and RC4Aes.

NOTE: The RC4 algorithm is only supported for backward compatibility. New material can only be encrypted using RC4 or RC4_128 when the database is in compatibility level 90 or 100. (Not recommended.) Use a newer algorithm such as one of the AES algorithms instead.

-InputObject <Endpoint>

  • This value is required
  • Accepts pipeline input ByValue

The Endpoint object of the endpoint that shall be modified. This must be a database mirroring endpoint.

-IpAddress <IPAddress>

The IP address on which the endpoint will listen.

-Owner <string>

The owner of the endpoint.

-Path <string>

The path to the database mirroring endpoint. This is an optional parameter. If not specified, the value of this parameter defaults to the current working location.

-Port <int>

  • Default value is 4022

The TCP port number used by the endpoint to listen for connections.

-Script [<SwitchParameter>]

Outputs a Transact-SQL script that performs the task executed by this cmdlet.

-State <EndpointState>

  • Default value is SMO.EndpointState.Stopped

The state of the endpoint: Started, Stopped, or Disabled.

-Confirm [<SwitchParameter>]

Prompts you for confirmation before executing the command.

-WhatIf [<SwitchParameter>]

Describes what would happen if you executed the command without actually executing the command.

<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,ErrorAction, ErrorVariable, WarningAction, WarningVariable,OutBuffer, PipelineVariable, and OutVariable.

Inputs

SMO.Endpoint

An AlwaysOn endpoint whose properties are to be set.

Outputs

SMO.Endpoint

Examples
  1. This command sets the port number of the database mirroring endpoint named ‘MyDbmEndpoint’ to 5050 on the server instance ‘ComputerInstance’:
    C:PS> Set-SqlHadrEndpoint -Path SQLSERVER:SqlComputerInstanceEndpointsMyDbmEndpoint -Port 5050
    
  2. This command starts the database mirroring endpoint named ‘MyDbmEndpoint’ on the server instance ‘ComputerInstance’:
    C:PS> Set-SqlHadrEndpoint -Path SQLSERVER:SqlComputerInstanceEndpointsMyDbmEndpoint -State Started
    
Additional Notes
 
Related Links