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


Remove-DbaDatabaseCertificate

Deletes specified database certificate.

Screenshots

dbatools - Remove-DbaDatabaseCertificate

Examples

The certificate in the master database on server1 will be removed if it exists.

Remove-DbaDatabaseCertificate -SqlInstance Server1

Suppresses all prompts to remove the certificate in the ‘db1’ database and drops the key.

Remove-DbaDatabaseCertificate -SqlInstance Server1 -Database db1 -Confirm:$false

Author

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

Get-Help

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

Source Code

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

Related commands