Monsieur Winner

MS D365FO || Monsieur D365FO

D365foTechnical

Generate SQL Server self-signed certificate

Part of the requirement to deploy D365FO on-premises, is the SQL server certificate.

Recently, I worked on rotating the SQL server certificate for an environment.

I used the following as stated on Microsoft docs, I used :


# If Remoting, execute
#.\Configure-SQLCert-AllVMs.ps1 -ConfigurationFilePath .\ConfigTemplate.xml

.\Configure-SQLCert.ps1 -PfxCertificatePath “.\Certs\SQL1.contoso.com.pfx”

But then I got some errors (because I was not using the latest Infrastructure folder).

Another way of generating the SQL server certificate.


# Manually create certificate for each SQL Node (i.e. 2 nodes = 2 certificates)
# Run script on each node
$computerName = $env:COMPUTERNAME.ToLower()
$domain = $env:USERDNSDOMAIN.ToLower()
$listenerName = 'monsieurwinner'
$cert = New-SelfSignedCertificate -Subject "$computerName.$domain" -DnsName "$listenerName.$domain", $listenerName, $computerName -Provider 'Microsoft Enhanced RSA and AES Cryptographic Provider' -CertStoreLocation "cert:\LocalMachine\My" -KeyAlgorithm "RSA" -HashAlgorithm "sha256" -KeyLength 2048

admin

Komi Siabi is a Bilingual D365FO Solution architect who loves sharing his knowledge as he works on Both Francophone and Anglophone projects around the globe. He enjoys doing some tiktok videos in his leisure time.

Leave a Reply

Your email address will not be published. Required fields are marked *