Exchange 2013: Create certificate request for public CA

Certificates from a Active Directory integrated certification authority can be easily requested via MMC. However, if you want to buy a certificate, you need a certificate request that can be submitted to the CA. Unfortunately, ECP offers few options for configuring the request and the subsequent certificate. The way via the Exchange Shell works much better. The command is a little longer, so here is a short explanation:

New-ExchangeCertificate -Server "Servername" -GenerateRequest -FriendlyName "Exchange certificate" -PrivateKeyExportable $true -SubjectName "c=COUNTRYCODE, s=COUNTRY, l=CITY, o= COMPANY, ou=ORGANIZATION, cn=ALLEGMEINERNAME" -DomainName outlook.frankysweb.de,autodiscover.frankysweb.de -RequestFile "\\SERVERNAME\C$\Request.csr"

-Friendlyname is the display name of the certificate in ECP, the name is freely selectable

-SubjectName determines the properties of the certificate:

  • "c" stands for the country code, for example "DE"
  • "s" stands for the federal state
  • "o" stands for the company
  • "ou" stands for the organizational unit (IT, Exchange, EDP...)
  • "cn" stands for the common name, the common name should contain the FQDN for OWA

-DomainNameAll alternative names for the certificate are entered here, as well as the general name, normally only Autodiscover and the access name for Outlook, OWA, ECP, ActiveSync etc. are required here:

  • outlook.frankysweb.de
  • autodiscover.frankysweb.de

-Requestfile: A share on which the request can be saved

Certificate request

image

The request can now be submitted to a CA. As soon as the certificate has been issued by the CA, the request can be completed:

Import-ExchangeCertificate -FileData ([Byte[]]$(Get-Content -Path c:\certificate.cer -Encoding byte -ReadCount 0))

Finally, the new certificate must be assigned to the Exchange services, either the thumbprint of the certificate just added is used for the CMDlet "enable-ExchangeCertificate", or the EAC is conveniently used. Here is the way via the shell:

Enable-ExchangeCertificate -Thumbprint "thumbprintvonimport" -Services POP,IMAP,SMTP,IIS

8 thoughts on “Exchange 2013: Zertifikatsanforderung für öffentliche CA erstellen”

  1. Danke für die Anleitung, ich habe allerdings eine Ergänzung/Abweichung: der interne FQDN muss bei den SAN dabei sein. Frisch installierter Ex 2016 CU14, allerdings im Rahmen einer SBS-Migration (jaja, ich weiß, der Kunde ist sehr spät dran ;-)).

    Reply
  2. Hallo zusammen, ich habe mal eine Frage. Mein Exchange Server 2019 (auf jeweils WIN 2019 SRV – DC und Exchange läuft. Ich habe allerdings 2 separate Zertifikate ( autodiscover.xxxx.yyy und exchange.xxxx.yyy) bestellt und auch erfolgreich importiert bekommen. Leider wird mir bei der Outlook-Konfiguration (autodiscover) die Exchange-Domäne angezeigt. InternalUrl ist auf autodiscover.xxxx.yyy/Autosicover/….. gesetzt.
    Gibt es eine Möglichkeit, die externe URL zu setzen? Oder geht das gar nicht?
    Vielen Dank im Voraus für Eure Hilfe

    Reply
  3. Die Erzeugung der Zertifiaktsanfrage per Powershell mit der Option „–PrivateKeyExportable $true“ war der entscheidende Hinweis!
    Da es uns vorher nicht gelungen ist ein Zertifiakt mit privatem Key zu bekommen und es entsprechend in Exchange 2013 zu importieren.

    Vielen Dank!!!

    Reply
  4. Hallo Frank,

    du schreibst unter DomainName werden alle alternativen Namen eingetragen – wir haben bis jetzt immer mit einer internen CA Zertifikate ausgestellt, möchte jetzt bei einem Exchange 2016 allerdings ein öffentliches Zertifikat verwenden. Unsere Domäne wäre ad.company.de, die ext. OWA Adresse owa.company.de, Autodiscover soll über autodiscover.company.de laufen. Wir würden das Zertifikat gerne intern für Outlook und extern für OWA / OutlookAnywhere verwenden. Welche Namen müssen in das SAN Zertifikat genau eingetragen werden, damit keine Zertifikatfehler auftauchen?

    Reply

Leave a Comment