In this article let’s have a look at things to consider during SSL certificate renewal in Exchange 2010 and 2013 environment.
First we need to confirm what type certificate we are using, i.e., the third-party certificate or self-signed certificate. And then we need to check the existing 3rd party certificate is associated with what all exchange services, number of SAN entries we have and note down them.
Let’s see the procedure of renewing the certificates for third party and self-signed.
For Third party Certificate Renewal
For renewing the third-party certificate, we need to apply a new certificate request from the third-party CA, then import the certificate to the Exchange servers and enable the related service (IIS, IMAP, POP, and SMTP) on the Exchange servers.
Follow the below steps:
Step 1: Obtain an SSL certificate. Purchase an SSL certificate from a well-known certification authority (CA).
Step 2: Generate and submit the certificate request: create a new certificate request for Secure Sockets Layer (SSL) services.
New-ExchangeCertificate -GenerateRequest -SubjectName "C=US, S = Contoso, L = Toybox, O = Test, OU = IT, CN = mail.contoso.com" -domainname mail.contoso.com, Mail.ad.contoso.com, Webmail.contoso.com -FriendlyName mail.contoso.com -privatekeyexportable:$true -path c:\cert.txt
IMP Note:
"DomainName" is used to populate one or more domain names (FQDNs) or server names in the resulting certificate request. We can replace ‘domainname’ according to our own environment.
"FriendlyName" is used to specify a display name for the resulting certificate. The display name must be lesser than 64 characters.
In SubjectName property, we can use the proper subject name by our own environment: c for country/region name, o for organization name and cn for common name.
Step 3: Enable the certificate on the Default Web site after your certificate has been generated, you must import it and then enable the certificate on the Default Web site.
Import-ExchangeCertificate -path c:\cert.cer
Note: "c:\cert.cer" is the location and name of our certificate in my example.
Enable-ExchangeCertificate -thumbprint <copied thumbprint value> -services "IIS,IMAP,POP,SMTP"
Note: Using the "enable-ExchangeCertificate" cmdlet will update the certificate mapping and replace the existing certificate that is configured in IIS, IMAP4, POP3, SMTP.
Step 4: Require the Client Access server virtual directories to use SSL
Step 5: Perform an IIS reset. Try browsing OWA and see if you get any errors
For Self Signed Certificate Renewal
For renewing the self-signed certificate, we need to get the old Thumbprint property of the expiring self-signed certificate, and then use New-ExchangeCertificate to renew the certificate and then enable the related service to the new certificate.
To get the existing thumbprint value
Run
Get-Exchangecertificate | fl
Important thing to note down the self-signed certificate should have a value True in the column IsSelfSigned
Then use the command remove-Exchangecertificate to remove the old expired certificate
Example
Remove-ExchangeCertificate -Thumbprint 5113ae0233a72fccb75b1d0198628675333d010e
You can use the command New-ExchangeCertificate to create a new certificate
Run the below command to perform the action
New-ExchangeCertificate -FriendlyName “SelfSigned Certificate” -KeySize 2048 -SubjectName “c=IN, s=, l=, o=CONTOSO, ou=IT, cn=CONTOSO.COM” -DomainName MAIL.CONTOSO.COM, AUTODISCOVER.CONTOSO.COM -PrivateKeyExportable $True
Below are the important things to keep in mind: