Продление сертификата Exchange Server

 

Продление сертификата Exchange Server


https://learn.microsoft.com/ru-ru/exchange/architecture/client-access/renew-certificates?view=exchserver-2019

https://learn.microsoft.com/en-us/exchange/architecture/client-access/renew-certificates?view=exchserver-2016

Renew an Exchange Server certificate

Every certificate has a built-in expiration date. In Exchange Server, the default self-signed certificate that's installed on the Exchange server expires 5 years after Exchange was installed on the server. You can use the Exchange admin center (EAC) or the Exchange Management Shell to renew Exchange certificates. This includes Exchange self-signed certificates, and certificates that were issued by a certification authority (CA).

 Note

The certificate management tasks are removed from EAC for Exchange Server 2016 CU23 and Exchange Server 2019 CU12. Use Exchange Management Shell procedure to export/import the certificate from these versions.

What do you need to know before you begin?

  • Estimated time to complete: 5 minutes

  • To learn how to open the Exchange Management Shell in your on-premises Exchange organization, see Open the Exchange Management Shell.

  • For certificates that were issued by a CA, verify the certificate request requirements of the CA. Exchange generates a PKCS #10 request (.req) file that uses Base64 encoding (default) or Distinguished Encoding Rules (DER), with an RSA public key that's 1024, 2048 (default), or 4096 bits. Note that encoding and public key options are only available in the Exchange Management Shell.

  • To renew a certificate that was issued by a CA, you need to renew the certificate with the same CA that issued the certificate. If you're changing CAs, or if there's a problem with the original certificate when you try to renew it, you need to create a new certificate request (also known as a certificate signing request or CSR) for a new certificate. For more information, see Create an Exchange Server certificate request for a certification authority.

  • If you renew or replace a certificate that was issued by a CA on a subscribed Edge Transport server, you need to remove the old certificate, and then delete and recreate the Edge Subscription. For more information, see Edge Subscription process.

  • You need to be assigned permissions before you can perform this procedure or procedures. To see what permissions you need, see the "Client Access services security" entry in the Clients and mobile devices permissions topic.

  • For information about keyboard shortcuts that may apply to the procedures in this topic, see Keyboard shortcuts in the Exchange admin center.

 Tip

Having problems? Ask for help in the Exchange forums. Visit the forums at: Exchange ServerExchange Online, or Exchange Online Protection.

Renew a certificate that was issued by a certification authority

The procedures are the same for certificates that were issued by an internal CA (for example, Active Directory Certificate Services), or a commercial CA.

To renew a certificate that was issued by a CA, you create a certificate renewal request, and then you send the request to the CA. The CA then sends you the actual certificate file that you need to install on the Exchange server. The procedure is nearly identical to that of completing a new certificate request by installing the certificate on the server. For instructions, see Complete a pending Exchange Server certificate request.

Use the EAC to create a certificate renewal request for a certification authority

  1. Open the EAC and navigate to Servers > Certificates.

  2. In the Select server list, select the Exchange server that holds the certificate that you want to renew.

  3. All valid certificates have a Renew link in the details pane that's visible when you select the certificate from the list. Select the certificate that you want to renew, and then click Renew in the details pane.

  4. On the Renew Exchange certificate page that opens, in the Save the certificate request to the following file field, enter the UNC path and filename for the new certificate renewal request file. For example, \\FileServer01\Data\ContosoCertRenewal.req. When you're finished, click OK.

The certificate request appears in the list of Exchange certificates with a status value of Pending.

Use the Exchange Management Shell to create a certificate renewal request for a certification authority

To create a new certificate renewal request for a certification authority, use the following syntax:

  • If you need to send the content of the certificate renewal request file to the CA, use the following syntax to create a Base64 encoded request file:

    PowerShell
    $txtrequest = Get-ExchangeCertificate -Thumbprint <Thumbprint> | New-ExchangeCertificate -GenerateRequest [-KeySize <1024 | 2048 | 4096>] [-Server <ServerIdentity>]
    [System.IO.File]::WriteAllBytes('<FilePathOrUNCPath>\<FileName>.req', [System.Text.Encoding]::Unicode.GetBytes($txtrequest))
    
  • If you need to send the certificate renewal request file to the CA, use the following syntax to create a DER encoded request file:

    PowerShell
    $binrequest = Get-ExchangeCertificate -Thumbprint <Thumbprint> | New-ExchangeCertificate -GenerateRequest -BinaryEncoded [-KeySize <1024 | 2048 | 4096>] [-Server <ServerIdentity>]
    [System.IO.File]::WriteAllBytes('<FilePathOrUNCPath>\<FileName>.pfx', $binrequest.FileData)
    

To find the thumbprint value of the certificate that you want to renew, run the following command:

PowerShell
Get-ExchangeCertificate | where {$_.Status -eq "Valid" -and $_.IsSelfSigned -eq $false} | Format-List FriendlyName,Subject,CertificateDomains,Thumbprint,NotBefore,NotAfter

For detailed syntax and parameter information, see Get-ExchangeCertificate and New-ExchangeCertificate.

Notes:

  • If you don't use the KeySize parameter, the certificate request has a 2048 bit RSA public key.
  • If you don't use the Server parameter, the command is run the local Exchange server.

This example creates a Base64 encoded certificate renewal request for the existing certificate with the Thumbprint value 5DB9879E38E36BCB60B761E29794392B23D1C054:

PowerShell
$txtrequest = Get-ExchangeCertificate -Thumbprint 5DB9879E38E36BCB60B761E29794392B23D1C054 | New-ExchangeCertificate -GenerateRequest
[System.IO.File]::WriteAllBytes('\\FileServer01\Data\ContosoCertRenewal.req', [System.Text.Encoding]::Unicode.GetBytes($txtrequest))

This example creates a DER (binary) encoded certificate renewal request for the same certificate:

PowerShell
$binrequest = Get-ExchangeCertificate -Thumbprint <Thumbprint> | New-ExchangeCertificate -GenerateRequest -BinaryEncoded
[System.IO.File]::WriteAllBytes('\\FileServer01\Data\ContosoCertRenewal.pfx', $binrequest.FileData)

How do you know that you successfully created a certificate renewal request?

To verify that you have successfully created a certificate renewal request for a certification authority, perform either of the following steps:

  • In the EAC at Servers > Certificates, verify the server where you stored the certificate request is selected. The request should be in the list of certificates with the Status value Pending request.

  • In the Exchange Management Shell on the server where you stored the certificate request, run the following command:

    PowerShell
    Get-ExchangeCertificate | where {$_.Status -eq "PendingRequest" -and $_.IsSelfSigned -eq $false} | Format-List FriendlyName,Subject,CertificateDomains,Thumbprint
    

Renew an Exchange self-signed certificate

When you renew an Exchange self-signed certificate, you're basically making a new certificate.

Use the EAC to renew an Exchange self-signed certificate

  1. Open the EAC and navigate to Servers > Certificates.

  2. In the Select server list, select the Exchange server that holds the certificate that you want to renew.

  3. All valid certificates have a Renew link in the details pane that's visible when you select the certificate from the list. Select the certificate that you want to renew, and then click Renew in the details pane.

  4. On the Renew Exchange certificate page that opens, verify the read-only list of Exchange services that the existing certificate is assigned to, and then click OK.

Use the Exchange Management Shell to renew an Exchange self-signed certificate

To renew a self-signed certificate, use the following syntax:

PowerShell
Get-ExchangeCertificate -Thumbprint <Thumbprint> | New-ExchangeCertificate [-Force] [-PrivateKeyExportable <$true | $false>]

To find the thumbprint value of the certificate that you want to renew, run the following command:

PowerShell
Get-ExchangeCertificate | where {$_.IsSelfSigned -eq $true} | Format-List FriendlyName,Subject,CertificateDomains,Thumbprint,NotBefore,NotAfter

This example renews a self-signed certificate on the local Exchange server, and uses the following settings:

  • The thumbprint value of the existing self-signed certificate to renew is BC37CBE2E59566BFF7D01FEAC9B6517841475F2D
  • The Force switch replaces the original self-signed certificate without a confirmation prompt.
  • The private key is exportable. This allows you to export the certificate and import it on other servers.
PowerShell
Get-ExchangeCertificate -Thumbprint BC37CBE2E59566BFF7D01FEAC9B6517841475F2D | New-ExchangeCertificate -Force -PrivateKeyExportable $true

How do you know that you've successfully renewed an Exchange self-signed certificate?

To verify that you have successfully renewed an Exchange self-signed certificate, use either of the following procedures:

  • In the EAC at Servers > Certificates, verify the server where you installed the certificate is selected. In the list of certificates, verify that the certificate has Status property value Valid.

  • In the Exchange Management Shell on the server where you renewed the self-signed certificate, run the following command to verify the property values:

PowerShell
Get-ExchangeCertificate | where {$_.Status -eq "Valid" -and $_.IsSelfSigned -eq $true} | Format-List FriendlyName,Subject,CertificateDomains,Thumbprint,NotBefore,NotAfter

 Important

Removing, renewing, or assigning services to the certificate can remove the certificate from Exchange Back End and Default Web Site. It's essential that you check the certificate bindings and apply the correct certificates.


Продление сертификата Exchange Server

У каждого сертификата есть встроенный срок действия. В Exchange Server срок действия самозаверяющего сертификата по умолчанию, установленного на сервере Exchange Server, истекает через 5 лет после установки Exchange на сервере. Для обновления сертификатов Exchange можно использовать Центр администрирования Exchange (EAC) или командную консоль Exchange. Это относится к самозаверяющим сертификатам Exchange и сертификатам, выданным центром сертификации (ЦС).

 Примечание

Задачи управления сертификатами удаляются из EAC для Exchange Server 2016 CU23 и Exchange Server 2019 CU12. Используйте процедуру командной консоли Exchange для экспорта или импорта сертификата из этих версий.

Что нужно знать перед началом работы

  • Предполагаемое время для завершения: 5 минут.

  • Сведения о том, как открыть командную консоль Exchange в локальной организации Exchange, см. в статье Open the Exchange Management Shell.

  • Если сертификаты выданы ЦС, проверьте требования ЦС к запросам сертификатов. Exchange создает файл запроса PKCS #10 (.req) в кодировке Base64 (по умолчанию) или Distinguished Encoding Rules (DER) с открытым ключом RSA длиной 1024, 2048 (по умолчанию) или 4096 бит. Обратите внимание, что параметры кодирования и открытого ключа доступны только в командной консоли Exchange.

  • Сертификат, выданный ЦС, нужно обновлять в выдавшем его ЦС. Если нужно изменить ЦС или возникла проблема при обновлении исходного сертификата, необходимо создать запрос нового сертификата (также известный как запрос подписи сертификата или CSR). Дополнительные сведения см. в статье Создание запроса на сертификат Exchange Server для центра сертификации.

  • Если вы обновите или замените сертификат, который был выпущен центром сертификации на подписанном пограничном транспортном сервере, вам нужно будет удалить старый сертификат, а затем удалить и заново создать пограничную подписку. Дополнительные сведения см. в разделе Процесс пограничной подписки.

  • Для выполнения этой процедуры (процедур) необходимы соответствующие разрешения. Сведения о необходимых разрешениях см. в записи "Безопасность служб клиентского доступа" в разделе Разрешения клиентов и мобильных устройств .

  • Сочетания клавиш для процедур, описанных в этой статье, приведены в статье Сочетания клавиш в Центре администрирования Exchange.

 Совет

Возникли проблемы? Обратитесь за помощью к участникам форумов Exchange. Посетите форумы по адресу: Exchange ServerExchange Online или Exchange Online Protection.

Обновление сертификата, выданного центром сертификации

Процедуры одинаковы для сертификатов, выданных внутренним (например, службами сертификации Active Directory) и коммерческим ЦС.

Чтобы обновить сертификат, выданный ЦС, создайте запрос на обновление сертификата и отправьте его в ЦС. Затем ЦС отправляет вам фактический файл сертификата, который необходимо установить на сервере Exchange Server. Почти аналогично выполняется запрос нового сертификата. Инструкции см. в разделе Выполнение ожидающего запроса на сертификат Exchange Server.

Создание запроса на обновление сертификата для центра сертификации с помощью Центра администрирования Exchange

  1. Откройте EAC и перейдите в раздел Сертификаты серверов>.

  2. В списке Выберите сервер выберите сервер Exchange с сертификатом, который требуется обновить.

  3. В области сведений всех действительных сертификатов есть ссылка Обновить, которая отображается при выборе сертификата из списка. Выберите сертификат, который требуется обновить, и нажмите Обновить в области сведений.

  4. На открывшейся странице Обновление сертификата Exchange в поле Сохранить запрос сертификата в следующий файл введите UNC-путь и имя файла нового запроса на обновление сертификата. Например, \\FileServer01\Data\ContosoCertRenewal.req. После этого нажмите кнопку ОК.

После этого запрос сертификата появится в списке сертификатов Exchange со статусом Ожидает.

Создание запроса на обновление сертификата для центра сертификации с помощью командной консоли Exchange

Чтобы создать новый запрос на продление сертификата для центра сертификации, используйте следующий синтаксис:

  • Если необходимо отправить содержимое файла запроса на продление сертификата в ЦС, используйте следующий синтаксис для создания файла запроса в кодировке Base64:

    PowerShell
    $txtrequest = Get-ExchangeCertificate -Thumbprint <Thumbprint> | New-ExchangeCertificate -GenerateRequest [-KeySize <1024 | 2048 | 4096>] [-Server <ServerIdentity>]
    [System.IO.File]::WriteAllBytes('<FilePathOrUNCPath>\<FileName>.req', [System.Text.Encoding]::Unicode.GetBytes($txtrequest))
    
  • Если необходимо отправить файл запроса на продление сертификата в ЦС, используйте следующий синтаксис для создания файла запроса в кодировке DER:

    PowerShell
    $binrequest = Get-ExchangeCertificate -Thumbprint <Thumbprint> | New-ExchangeCertificate -GenerateRequest -BinaryEncoded [-KeySize <1024 | 2048 | 4096>] [-Server <ServerIdentity>]
    [System.IO.File]::WriteAllBytes('<FilePathOrUNCPath>\<FileName>.pfx', $binrequest.FileData)
    

Чтобы найти значение отпечатка сертификата, который требуется обновить, выполните следующую команду:

PowerShell
Get-ExchangeCertificate | where {$_.Status -eq "Valid" -and $_.IsSelfSigned -eq $false} | Format-List FriendlyName,Subject,CertificateDomains,Thumbprint,NotBefore,NotAfter

Подробные сведения о синтаксисе и параметрах см. в разделах Get-ExchangeCertificate и New-ExchangeCertificate.

Примечания:

  • Если параметр KeySize не используется, запрос на сертификат содержит 2048-разрядный открытый ключ RSA.
  • Если параметр Server не используется, команда выполняется на локальном сервере Exchange Server.

В этом примере создается запрос на продление сертификата в кодировке Base64 для существующего сертификата со значением 5DB9879E38E36BCB60B761E29794392B23D1C054отпечатка :

PowerShell
$txtrequest = Get-ExchangeCertificate -Thumbprint 5DB9879E38E36BCB60B761E29794392B23D1C054 | New-ExchangeCertificate -GenerateRequest
[System.IO.File]::WriteAllBytes('\\FileServer01\Data\ContosoCertRenewal.req', [System.Text.Encoding]::Unicode.GetBytes($txtrequest))

В этом примере создается запрос на продление сертификата в кодировке DER (двоичный) для того же сертификата:

PowerShell
$binrequest = Get-ExchangeCertificate -Thumbprint <Thumbprint> | New-ExchangeCertificate -GenerateRequest -BinaryEncoded
[System.IO.File]::WriteAllBytes('\\FileServer01\Data\ContosoCertRenewal.pfx', $binrequest.FileData)

Как узнать, что вы успешно создали запрос на продление сертификата?

Чтобы убедиться, что вы успешно создали запрос на обновление сертификата для центра сертификации, выполните любое из следующих действий:

  • В центре администрирования Exchange в разделе Сертификаты серверов> убедитесь, что выбран сервер, на котором хранится запрос сертификата. Запрос должен быть в списке сертификатов и иметь статусОжидающий запрос.

  • В командной консоли Exchange на сервере, где хранится запрос сертификата, выполните следующую команду:

    PowerShell
    Get-ExchangeCertificate | where {$_.Status -eq "PendingRequest" -and $_.IsSelfSigned -eq $false} | Format-List FriendlyName,Subject,CertificateDomains,Thumbprint
    

Обновление самозаверяющего сертификата Exchange

Когда вы обновляете самозаверяющий сертификат Exchange, вы, по сути, создаете новый сертификат.

Обновление самозаверяющего сертификата Exchange с помощью Центра администрирования Exchange

  1. Откройте EAC и перейдите в раздел Сертификаты серверов>.

  2. В списке Выберите сервер выберите сервер Exchange с сертификатом, который требуется обновить.

  3. В области сведений всех действительных сертификатов есть ссылка Обновить, которая отображается при выборе сертификата из списка. Выберите сертификат, который требуется обновить, и нажмите Обновить в области сведений.

  4. На открывшейся странице Обновление сертификата Exchange проверьте нередактируемый список служб Exchange, которым назначен существующий сертификат, и нажмите кнопку ОК.

Обновление самозаверяющего сертификата Exchange с помощью командной консоли Exchange

Чтобы обновить самозаверяющий сертификат, используйте следующий синтаксис:

PowerShell
Get-ExchangeCertificate -Thumbprint <Thumbprint> | New-ExchangeCertificate [-Force] [-PrivateKeyExportable <$true | $false>]

Чтобы найти значение отпечатка сертификата, который требуется обновить, выполните следующую команду:

PowerShell
Get-ExchangeCertificate | where {$_.IsSelfSigned -eq $true} | Format-List FriendlyName,Subject,CertificateDomains,Thumbprint,NotBefore,NotAfter

В этом примере обновляется самозаверяющий сертификат на локальном сервере Exchange, при этом используются следующие параметры:

  • Значение отпечатка для существующего самозаверяющего сертификата для продления : BC37CBE2E59566BFF7D01FEAC9B6517841475F2D
  • Параметр Force заменяет исходный самозаверяющий сертификат без запроса на подтверждение.
  • Закрытый ключ можно экспортировать. То есть вы можете экспортировать сертификат и импортировать его на другие серверы.
PowerShell
Get-ExchangeCertificate -Thumbprint BC37CBE2E59566BFF7D01FEAC9B6517841475F2D | New-ExchangeCertificate -Force -PrivateKeyExportable $true

Как узнать, что вы успешно обновили самозаверяющий сертификат Exchange?

Чтобы убедиться, что вы успешно обновили самозаверяющий сертификат Exchange, выполните одно из следующих действий:

  • В центре администрирования Exchange в разделе Сертификаты серверов> убедитесь, что выбран сервер, на котором установлен сертификат. В списке серверов убедитесь, что сертификат имеет статусДействительный.

  • В командной консоли Exchange на сервере, на котором вы обновили самозаверяющий сертификат, выполните следующую команду, чтобы проверить значения свойств:

PowerShell
Get-ExchangeCertificate | where {$_.Status -eq "Valid" -and $_.IsSelfSigned -eq $true} | Format-List FriendlyName,Subject,CertificateDomains,Thumbprint,NotBefore,NotAfter

 Важно!

Удаление, продление или назначение служб сертификату может привести к удалению сертификата с серверной части Exchange и веб-сайта по умолчанию. Важно проверить привязки сертификатов и применить правильные сертификаты.

Дополнительные ресурсы

Не удается открыть OWA, ECP или EMS после удаления самозаверяющего сертификата с веб-сайта серверной части Exchange


Комментарии

Популярные сообщения из этого блога

У вас нет прав для отправки сообщения вместо указанного пользователя. Ошибка: [0x80070005-0x0004dc-0x000524]

Пустое значение виртуального каталога Autodiscover - Object reference not set to an instance of an object (Get-AutodiscoverVirtualDirectory)

KSMG Подготовка конфигурационных файлов для подключения к LDAP