dbatools is a free PowerShell module with over 300 SQL Server administration, best practice and migration commands included.

Please note that documentation and command names may be out of date while we work furiously towards 1.0


Get-DbaDatabaseCertificate

Gets database certificates.

Screenshots

dbatools-Get-DbaDatabaseCertificate

Examples

Gets all certificates.

Get-DbaDatabaseCertificate -SqlInstance sql2016

Gets the certificate for the db1 database.

Get-DbaDatabaseCertificate -SqlInstance Server1 -Database db1

Gets the cert1 certificate within the db1 database.

Get-DbaDatabaseCertificate -SqlInstance Server1 -Database db1 -Certificate cert1

Author

This command was created by Chrissy LeMaire. You can find Chrissy on Twitter and his blog.

Get-Help

From PowerShell, execute Get-Help Get-DbaDatabaseCertificate -Detailed for more information on this function.

Source Code

Want to see the source code? View Get-DbaDatabaseCertificate.ps1 on GitHub
 

Related commands