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 Zertifikat" –PrivateKeyExportable $true –SubjectName "c=LÄNDERCODE, s=BUNDESLAND, l=STADT, o=FIRMA, ou=ORGANISATIONSEINHEIT, cn=ALLEGMEINERNAME" –DomainName outlook.frankysweb.de,autodiscover.frankysweb.de –RequestFile "\\SERVERNAME\C$\Anforderung.csr"
-Friendlyname is the display name of the certificate in ECP, the name is freely selectable
-SubjectName determines the properties of the certificate:
- „c“ steht für den Ländercode, beispielsweise „DE“
- „s“ steht für das Bundesland
- „o“ steht für die Firma
- „ou“ steht für die Organisationseinheit (IT, Exchange, EDV..)
- „cn“ steht für den allgemeinen Namen, der allgemeine Name sollte den FQDN für OWA enthalten
-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
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))
Zum Abschluss muss das neue Zertifikat den Exchange Diensten zugewiesen werden, entweder der Thumbprint des eben hinzugefügten Zertifikats wird für das CMDlet „enable-ExchangeCertificate“ verwendet, oder es wird bequem das EAC verwendet. Hier der Weg über die Shell:
Enable-ExchangeCertificate -Thumbprint "thumbprintvonimport" -Services POP,IMAP,SMTP,IIS