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


Adds a computer certificate from a local or remote computer. Helpful for older systems.


dbatools - Add-DbaComputerCertificate


Adds the local C:\temp\cer.cer to the remote server Server1 in LocalMachine\My (Personal).

Add-DbaComputerCertificate -ComputerName Server1 -Path C:\temp\cert.cer

Adds the local C:\temp\cer.cer to the local computer’s LocalMachine\My (Personal) certificate store.

Add-DbaComputerCertificate -Path C:\temp\cert.cer


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


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

Source Code

Want to see the source code? View Add-DbaComputerCertificate.ps1 on GitHub

Related commands