Creates a new database certificate. If no database is specified, the certificate will be created in master.
You will be prompted to securely enter your password, then a certificate will be created in the master database on server1 if it does not exist.
New-DbaDatabaseCertificate -SqlInstance Server1
Suppresses all prompts to install but prompts to securely enter your password and creates a certificate in the ‘db1’ database.
New-DbaDatabaseCertificate -SqlInstance Server1 -Database db1 -Confirm:$false