这里是普通文章模块栏目内容页
续订Exchange Server证书

每个证书都有内置的到期日期。 在Exchange Server中,安装在Exchange服务器上的默认自签名证书在服务器上安装Exchange后 5 年过期。 您可以使用 Exchange 管理中心 (EAC) 或 Exchange 命令行管理程序 续订 Exchange 证书。 这包括 Exchange 自签名证书和由证书机构 (CA) 颁发的证书。

开始前,需要知道什么?

  • 估计完成时间:5 分钟

  • 若要了解如何在本地 Exchange 组织中打开 Exchange 命令行管理程序,请参阅 Open the Exchange Management Shell

  • 对于由 CA 颁发的证书,确认 CA 的证书请求要求。Exchange 生成使用 Base64 编码(默认)或可分辨编码规则 (DER) 的 PKCS #10 请求 (.req) 文件,使用 1024、2048(默认)或 4096 位的 RSA 公钥。请注意,编码和公钥选项仅在 Exchange 命令行管理程序 中可用。

  • 若要续订由 CA 颁发的证书,需使用由同一 CA 颁发的证书来续订证书。 如果更改 CA,或尝试续订证书时原始证书出错,您需要为新的证书创建新的证书请求(也称为证书签名请求或 CSR)。 有关详细信息,请参阅为证书颁发机构创建Exchange Server证书请求

  • 如果续订或替换由订阅的边缘传输服务器上的 CA 颁发的证书,则需要删除旧证书,然后删除并重新创建边缘订阅。有关详细信息,请参阅边缘订阅进程

  • 您必须先获得权限,然后才能执行此过程或多个过程。若要查看所需的权限,请参阅 客户端和移动设备权限主题中的"客户端访问服务安全"条目。

  • 若要了解本主题中的过程可能适用的键盘快捷键,请参阅 Exchange 管理中心内的键盘快捷键

 提示

遇到问题?请访问以下 Exchange 论坛寻求帮助:Exchange ServerExchange Online 或 Exchange Online Protection

续订由证书颁发机构颁发的证书。

获取由内部 CA(例如,Active Directory 证书服务)或商业 CA 颁发的证书的过程是相同的。

若要续订由 CA 颁发的证书,需创建证书续订请求,然后向 CA 发送请求。 之后 CA 将向您发送实际证书文件(该文件需要在 Exchange 服务器上安装)。 该步骤和通过在服务器上安装证书以完成新证书的请求的步骤几乎是相同的。 有关说明,请参阅“完成挂起的Exchange Server证书请求

使用 EAC 创建面向证书颁发机构的证书续订请求

  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. 例如,\\FileServer01\Data\ContosoCertRenewal.req。 完成后,单击 “确定”。

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

使用 Exchange 命令行管理程序 创建面向证书颁发机构的证书续订请求

若要为证书颁发机构创建新的证书续订请求,请使用以下语法:

  • 如果需要将证书续订请求文件 的内容 发送到 CA,请使用以下语法创建 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))
    
  • 如果需要将 证书续订请求文件 发送到 CA,请使用以下语法创建 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 公钥。
  • 如果不使用 服务器 参数,则该命令将运行本地Exchange服务器。

此示例为具有指纹值 5DB9879E38E36BCB60B761E29794392B23D1C054的现有证书创建 Base64 编码的证书续订请求:

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)

如何知道已成功创建证书续订请求?

若要确认是否已成功为证书颁发机构创建了证书续订请求,请执行以下步骤之一:

  • 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.

  • 在用于存储证书请求的服务器上的 Exchange 命令行管理程序 中,运行以下命令:

    PowerShell

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

续订 Exchange 自签名证书

续订 Exchange 自签名证书的过程基本上相当于制作了一个新的证书。

使用 EAC 以续订 Exchange 自签名证书

  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.

使用 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
  • 强制 开关在没有确认提示的情况下替换原始自签名证书。
  • 该私钥是可以导出的。这样,您可以导出证书并将其导入到其他服务器上。

PowerShell

Get-ExchangeCertificate -Thumbprint BC37CBE2E59566BFF7D01FEAC9B6517841475F2D | New-ExchangeCertificate -Force -PrivateKeyExportable $true

如何知道已成功续订Exchange自签名证书?

若要确认您是否已成功地续订了 Exchange 自签名证书,请使用以下过程之一:

  • 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.

  • 在续订自签名证书的服务器上的 Exchange 命令行管理程序 中,运行以下命令以确认属性值:

PowerShell

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