Author | Chrissy LeMaire (@cl), netnerds.net |
Availability | Windows, Linux, macOS |
Want to see the source code for this command? Check out Test-DbaEndpoint on GitHub.
Want to see the Bill Of Health for this command? Check out Test-DbaEndpoint.
Performs a simple connectivity test for TCP and SSL enabled endpoints.
Performs a simple connectivity test for TCP and SSL enabled endpoints. Tests if port is accessible, not if endpoint is working.
Note that if an endpoint does not have a tcp listener port, it will be skipped.
Test-DbaEndpoint
[[-SqlInstance] <DbaInstanceParameter[]>]
[[-SqlCredential] <PSCredential>]
[[-Endpoint] <String[]>]
[[-InputObject] <Endpoint[]>]
[-EnableException]
[<CommonParameters>]
PS C:\> Test-DbaEndpoint -SqlInstance localhost
Tests all endpoints on the local default SQL Server instance.
Note that if an endpoint does not have a tcp listener port, it will be skipped.
PS C:\> Get-DbaEndpoint -SqlInstance localhost, sql2016 -Endpoint Mirror | Test-DbaEndpoint
Tests all endpoints named Mirroring on sql2016 and localhost.
Note that if an endpoint does not have a tcp listener port, it will be skipped.
PS C:\> Test-DbaEndpoint -SqlInstance localhost, sql2016 -Endpoint Mirror
Tests all endpoints named Mirroring on sql2016 and localhost.
Note that if an endpoint does not have a tcp listener port, it will be skipped.
PS C:\> Test-DbaEndpoint -SqlInstance localhost -Verbose
Tests all endpoints on the local default SQL Server instance.
See all endpoints that were skipped due to not having a tcp listener port.
The target SQL Server instance or instances.
Alias | |
Required | False |
Pipeline | false |
Default Value |
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 |
Test only specific endpoint or endpoints.
Alias | |
Required | False |
Pipeline | false |
Default Value |
Enables piping from Get-DbaEndpoint.
Alias | |
Required | False |
Pipeline | true (ByValue) |
Default Value |
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 |