Generating a certificate request
In order to create a new certificate, you first need to generate a certificate request using either the Exchange Admin Center, or through the Shell using the New-ExchangeCertificate
cmdlet. Once you have a certificate request generated, you can then obtain a certificate from an internal Certificate Authority (CA) or from a third-party external CA (recommended). In this recipe, we'll take a look at the process of generating a certificate request from the Exchange Management Shell.
How to do it...
Let's see how to generate a certificate request using the following steps:
- In this example, we'll generate a request using two Subject Alternative Names (SANs). This will allow us to support multiple URLs with one certificate:
$cert = New-ExchangeCertificate -GenerateRequest '-SubjectName "c=US, o=Contoso, cn=mail.contoso.com" '-DomainName autodiscover.contoso.com, mail.contoso.com '-PrivateKeyExportable $True
- After the request has been generated, we can export it to a...