commands

^

Get-DbaNetworkCertificate

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

 

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

Synopsis

Gets the computer certificate enabled for the SQL Server instance's network encryption.

Description

Gets the computer certificates that is assigned to the SQL Server instance for enabling network encryption.

Syntax

Get-DbaNetworkCertificate
    [[-SqlInstance] <DbaInstanceParameter[]>]
    [[-Credential] <PSCredential>]
    [-EnableException]
    [<CommonParameters>]

 

Examples

 

Example: 1
PS C:\> Get-DbaNetworkCertificate -SqlInstance sql2016

Gets computer certificate for the standard instance on sql2016 that is being used for SQL Server network encryption

Example: 2
PS C:\> Get-DbaNetworkCertificate -SqlInstance server1\sql2017

Gets computer certificate for the named instance sql2017 on server1 that is being used for SQL Server network encryption

Optional Parameters

-SqlInstance

The target SQL Server instance or instances. Defaults to standard instance on localhost. If target is a cluster, you must specify the distinct nodes.

Alias ComputerName
Required False
Pipeline true (ByValue)
Default Value $env:COMPUTERNAME
-Credential

Alternate credential object to use for accessing the target computer(s).

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