To generate a Certificate Signing Request (CSR) for an SSL certificate in Microsoft Exchange 2013, you can use the New-ExchangeServerCertificate cmdlet in the Exchange Management Shell. Here’s how you can do it:
- Open Exchange Management Shell: Start by opening the Exchange Management Shell on your server.
- Replace
<Friendly Name for Certificate>with a name you’ll use to identify the certificate. - Use your fully qualified domain name (FQDN) for
-DnsDomainand-CommonName. - Provide the correct two-letter country code for
-Country, the state or province name for-State, and the city for-City. - Include your organization’s name in
-Organizationand department or role in-OrganizationalUnit.
- Replace
- Submit the CSR to a Certificate Authority (CA): After running the cmdlet, you’ll receive the CSR. Submit this to a trusted CA like Let's Encrypt or an internal CA.
- Notes:
- Ensure all details like country, state, city, and organization are accurate.
- Avoid special characters in parameter values; stick to alphanumeric.
- Set
-PrivateKeyExportable $trueif the certificate will be used on another server.
- Activate the Certificate: Use the full CSR text provided by the CA, including
BEGINandENDlines, when activating it in Exchange.
Import the SSL Certificate: Once the CA issues the certificate, download it and use:
Import-ExchangeServerCertificate -FilePath "<Certs\MyCert.cer>" -PasswordOrKeyFilePassword "<Password>"
Replace <Certs\MyCert.cer> with the actual file path and <Password> with the password you used when requesting the certificate.
Run the New-ExchangeServerCertificate Cmdlet:
New-ExchangeServerCertificate -Name "<Friendly Name for Certificate>" -DnsDomain "<YourDomain.com>" -Country "XX" -State "State or Province" -City "Location" -Organization "Company Name" -OrganizationalUnit "Department" -CommonName "<Fully Qualified Domain Name>"
