Author Chrissy LeMaire (@cl),
Availability Windows only



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


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


    [[-ComputerName] <DbaInstanceParameter[]>]
    [[-Credential] <PSCredential>]




Example: 1
PS C:\> Get-DbaNetworkCertificate

Gets computer certificates on localhost that are candidates for using with SQL Server's network encryption

Example: 2
PS C:\> Get-DbaNetworkCertificate -ComputerName sql2016

Gets computer certificates on sql2016 that are being used for SQL Server network encryption

Optional Parameters


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

Required False
Pipeline true (ByValue)
Default Value $env:COMPUTERNAME

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

Required False
Pipeline false
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.

Required False
Pipeline false
Default Value False


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.