適用於:
2016
2019
訂閱版本
概觀
安裝 Exchange Server 之後,常見的系統管理工作是自定義設定,例如用戶端特定的訊息大小限制。 這些設定通常會在 web.config、 sharedweb.config和 Exchange 伺服器上的其他組態檔中設定。
在過去,Exchange 伺服器管理員的其中一個挑戰是每次安裝累積更新 (CU) 時,安裝程式都會覆寫這些檔案和其中的自定義設定,強制系統管理員備份/還原其設定,或在每次 CU 安裝之後重新套用它們。
使用 Exchange Server 2019 CU13 和更新版本時,安裝程式現在會備份並還原最常見的組態檔,讓系統管理員不再需要手動還原或重新套用它們。
安裝程式會以下列方式保留自訂組態:
- 安裝程式會建立現有檔案的備份。
- 安裝程式會安裝 Exchange Server (或升級現有的 Exchange Server) ,並以 Exchange 安裝程式中存在的預設組態和設定覆寫現有的檔案。
- 安裝程式最後會在從 Exchange 安裝程式複製的新組態檔中,還原儲存在預升級組態檔中的重要密鑰的適當檔案和自定義值。
如果存在) ,安裝程式會保留最重要的組態設定 (,其中可以包含整個區段或特定的索引鍵值組。
appSettings包含許多設定應用程式設定範圍的索引鍵值組,例如 (記錄路徑、消息佇列大小等 ) 。 如果此區段存在,則會保留使用<add key>標記建立的任何索引鍵值組。例如,在下列檔案中,
ClientTunnelExpirationTime會保留。<configuration> <appSettings> <add key="ClientTunnelExpirationTime" value="30" /> </appSettings> </ configuration>整個
proxySettings區段很重要,而且會保留。maxAllowedContentLength用來指定在要求中以位元組) (內容的最大長度。<system.webServer> <security> <requestFiltering> <requestLimits maxAllowedContentLength="4194304" /> </requestFiltering> </security> <system.webServer>maxRequestLength用來指定要求大小上限。<system.web> <httpRuntime maxRequestLength="4194304" /> </system.web>maxReceivedMessageSize用於 和custombinding元素,systembinding以位元組為單位設定大小上限 () 可在使用此系結設定的通道上接收的訊息。maxStringContentLength同時存在於和customBinding元素中systembinding,並用來限制 XML 讀取器傳回的最大字串大小。extendedProtectionPolicy用來設定擴充保護原則,伺服器會使用此原則來驗證傳入的用戶端連線。defaultProxy用來設定 HTTP Proxy 伺服器。
保留的組態檔清單,以及保留的區段和金鑰
以下是所有組態檔的清單,以及 CU 升級期間自動保留的區段和密鑰。
注意事項
這項功能不會保留套用在每個月臺/每一 vDir 層級上的 IIS URL 重寫規則防護功能,如果仍然適用於已安裝的 CU,最終會由 Exchange 緊急風險降低服務重新套用。 如需詳細資訊,請 參閱這裡。
| 不能。 | 組態檔名稱 | 保留的區段 | 保留的其他金鑰 |
|---|---|---|---|
| 1 | <ExchangeInstallPath>\V15\Bin\ComplianceAuditService.exe.config |
appSettings | - |
| 2 | <ExchangeInstallPath>\V15\Bin\EdgeTransport.exe.config |
appSettings | - |
| 3 | <ExchangeInstallPath>\V15\Bin\Microsoft.Exchange.Diagnostics.Service.exe.config |
appSettings | - |
| 4 | <ExchangeInstallPath>\V15\Bin\Microsoft.Exchange.Directory.TopologyService.exe.config |
appSettings | maxReceivedMessageSize, maxStringContentLength |
| 5 | <ExchangeInstallPath>\V15\Bin\Microsoft.Exchange.EdgeSyncSvc.exe.config |
appSettings | - |
| 6 | <ExchangeInstallPath>\V15\Bin\Microsoft.Exchange.Mitigation.Service.exe.config |
appSettings | - |
| 9 | <ExchangeInstallPath>\V15\Bin\Microsoft.Exchange.RpcClientAccess.Service.exe.config |
appSettings、defaultProxy | maxReceivedMessageSize, maxStringContentLength |
| 10 | <ExchangeInstallPath>\V15\Bin\Microsoft.Exchange.Search.Service.exe.config |
appSettings | - |
| 12 | <ExchangeInstallPath>\V15\Bin\Microsoft.Exchange.Servicehost.exe.config |
appSettings、defaultProxy | maxReceivedMessageSize, maxStringContentLength |
| 14 | <ExchangeInstallPath>\V15\Bin\Microsoft.Exchange.Store.Service.exe.config |
appSettings | - |
| 17 | <ExchangeInstallPath>\V15\Bin\MSExchangeCompliance.exe.config |
appSettings | - |
| 18 | <ExchangeInstallPath>\V15\Bin\MSExchangeDelivery.exe.config |
appSettings | - |
| 19 | <ExchangeInstallPath>\V15\Bin\MSExchangeFrontEndTransport.exe.config |
appSettings | - |
| 20 | <ExchangeInstallPath>\V15\Bin\MSExchangeHMHost.exe.config |
appSettings | - |
| 21 | <ExchangeInstallPath>\V15\Bin\MSExchangeHMRecovery.exe.config |
appSettings | - |
| 22 | <ExchangeInstallPath>\V15\Bin\MSExchangeHMWorker.exe.config |
appSettings | - |
| 23 | <ExchangeInstallPath>\V15\Bin\MSExchangeMailboxAssistants.exe.config |
appSettings | - |
| 24 | <ExchangeInstallPath>\V15\Bin\MsExchangeMailboxReplication.exe.config |
appSettings、defaultProxy | maxReceivedMessageSize, maxStringContentLength |
| 26 | <ExchangeInstallPath>\V15\Bin\MSExchangeSubmission.exe.config |
appSettings | - |
| 27 | <ExchangeInstallPath>\V15\Bin\MSExchangeThrottling.exe.config |
appSettings | - |
| 28 | <ExchangeInstallPath>\V15\Bin\MSExchangeTransport.exe.config |
appSettings | - |
| 29 | <ExchangeInstallPath>\V15\ClientAccess\PopImap\Microsoft.Exchange.Imap4.exe.config |
appSettings、 defaultProxy |
- |
| 30 | <ExchangeInstallPath>\V15\ClientAccess\PopImap\Microsoft.Exchange.Imap4Service.exe.config |
appSettings | - |
| 31 | <ExchangeInstallPath>\V15\ClientAccess\PopImap\Microsoft.Exchange.Pop3.exe.config |
appSettings、 defaultProxy |
- |
| 32 | <ExchangeInstallPath>\V15\ClientAccess\PopImap\Microsoft.Exchange.Pop3Service.exe.config |
appSettings | - |
| 33 | <ExchangeInstallPath>\V15\FrontEnd\PopImap\Microsoft.Exchange.Imap4.exe.config |
appSettings、 defaultProxy |
- |
| 34 | <ExchangeInstallPath>\V15\FrontEnd\PopImap\Microsoft.Exchange.Imap4Service.exe.config |
appSettings | - |
| 35 | <ExchangeInstallPath>\V15\FrontEnd\PopImap\Microsoft.Exchange.Pop3.exe.config |
appSettings、 defaultProxy |
- |
| 36 | <ExchangeInstallPath>\V15\FrontEnd\PopImap\Microsoft.Exchange.Pop3Service.exe.config |
appSettings | - |
| 37 | <ExchangeInstallPath>\V15\Bin\Microsoft.Exchange.AddressBook.Service.dll.config |
appSettings | - |
| 38 | <ExchangeInstallPath>\V15\Bin\Microsoft.Exchange.Management.Transport.dll.config |
appSettings | - |
| 39 | <ExchangeInstallPath>\V15\TransportRoles\agents\Antimalware\Microsoft.Exchange.Transport.Agent.Malware.dll.config |
appSettings | - |
| 40 | <ExchangeInstallPath>\V15\Bin\MSExchangeUM.config |
appSettings | - |
| 41 | <ExchangeInstallPath>\V15\ClientAccess\Autodiscover\web.config |
appSettings | maxReceivedMessageSize |
| 42 | <ExchangeInstallPath>\V15\ClientAccess\ecp\web.config |
appSettings | maxReceivedMessageSize, maxStringContentLength |
| 43 | <ExchangeInstallPath>\V15\ClientAccess\ecp\DLPPolicy\Web.config |
- | maxRequestLength |
| 44 | <ExchangeInstallPath>\V15\ClientAccess\ecp\Handlers\Web.config |
- | maxRequestLength |
| 45 | <ExchangeInstallPath>\V15\ClientAccess\ecp\PersonalSettings\Web.config |
- | maxRequestLength |
| 46 | <ExchangeInstallPath>\V15\ClientAccess\ecp\UsersGroups\Web.config |
- | maxRequestLength |
| 47 | <ExchangeInstallPath>\V15\ClientAccess\exchweb\ews\web.config |
appSettings、 defaultProxy、 extendedProtectionPolicy |
maxAllowedContentLength、 maxReceivedMessageSize, maxRequestLength、 maxStringContentLength |
| 48 | <ExchangeInstallPath>\V15\ClientAccess\mapi\emsmdb\web.config |
appSettings、 defaultProxy |
maxAllowedContentLength、 maxReceivedMessageSize, maxRequestLength、 maxStringContentLength |
| 49 | <ExchangeInstallPath>\V15\ClientAccess\mapi\nspi\web.config |
appSettings、 defaultProxy |
maxAllowedContentLength、 maxRequestLength |
| 50 | <ExchangeInstallPath>\V15\ClientAccess\OAB\web.config |
appSettings | - |
| 52 | <ExchangeInstallPath>\V15\ClientAccess\PowerShell\web.config |
appSettings | - |
| 53 | <ExchangeInstallPath>\V15\ClientAccess\PowerShell-Proxy\web.config |
appSettings | - |
| 54 | <ExchangeInstallPath>\V15\ClientAccess\PushNotifications\web.config |
appSettings | maxReceivedMessageSize |
| 55 | <ExchangeInstallPath>\V15\ClientAccess\rest\web.config |
appSettings | maxAllowedContentLength、 maxRequestLength |
| 56 | <ExchangeInstallPath>\V15\ClientAccess\RpcProxy\web.config |
appSettings | - |
| 57 | <ExchangeInstallPath>\V15\ClientAccess\Sync\web.config |
appSettings、 defaultProxy |
MaxDocumentDataSize、 maxRequestLength、 maxAllowedContentLength |
| 58 | <ExchangeInstallPath>\V15\FrontEnd\HttpProxy\autodiscover\web.config |
appSettings | - |
| 59 | <ExchangeInstallPath>\V15\FrontEnd\HttpProxy\ecp\web.config |
appSettings | maxAllowedContentLength、 maxRequestLength |
| 60 | <ExchangeInstallPath>\V15\FrontEnd\HttpProxy\ews\web.config |
appSettings | maxAllowedContentLength、 maxRequestLength |
| 61 | <ExchangeInstallPath>\V15\FrontEnd\HttpProxy\mapi\web.config |
appSettings | maxAllowedContentLength、 maxRequestLength |
| 62 | <ExchangeInstallPath>\V15\FrontEnd\HttpProxy\oab\web.config |
appSettings | - |
| 63 | <ExchangeInstallPath>\V15\FrontEnd\HttpProxy\owa\web.config |
appSettings | maxAllowedContentLength、 maxRequestLength |
| 64 | <ExchangeInstallPath>\V15\FrontEnd\HttpProxy\powershell\web.config |
appSettings | - |
| 65 | <ExchangeInstallPath>\V15\FrontEnd\HttpProxy\pushnotifications\web.config |
appSettings | maxAllowedContentLength、 maxRequestLength |
| 66 | <ExchangeInstallPath>\V15\FrontEnd\HttpProxy\ReportingWebService\web.config |
appSettings | - |
| 67 | <ExchangeInstallPath>\V15\FrontEnd\HttpProxy\rest\web.config |
appSettings | maxAllowedContentLength、 maxRequestLength |
| 68 | <ExchangeInstallPath>\V15\FrontEnd\HttpProxy\rpc\web.config |
appSettings | maxAllowedContentLength、 maxRequestLength |
| 69 | <ExchangeInstallPath>\V15\FrontEnd\HttpProxy\sync\web.config |
appSettings | maxRequestLength、 maxAllowedContentLength |
| 70 | <ExchangeInstallPath>\V15\FIP-FS\Data\Configuration.xml |
ProxySettings | - |
| 71 | <ExchangeInstallPath>\V15\Bin\Search\Ceres\Runtime\1.0\Noderunner.exe.config |
- | memoryLimitMegabytes |
安裝程式完成之後,它會顯示下列訊息,指出已成功還原所有保留的組態設定。
GUI 模式
自動模式
保留組態檔的備份會儲存在 %ProgramFiles%\Microsoft\Exchange Server\V15\Config 使用 命名格式的子資料夾中 v_<ExchangeVersion>_<Timestamp>。
注意事項
如果安裝程式完成後不需要這些檔案,可以安全地刪除這些檔案。
安裝程式預設會保留自定義設定。 如果您不想要使用此功能,您可以在 下建立REG_SZ專案DisablePreservation,並將值設定為 1來HKLM\SOFTWARE\Microsoft\ExchangeServer\v15\Setup停用它。
您可以執行下列 PowerShell 命令來建立索引鍵/值群組:
New-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\ExchangeServer\v15\Setup -Name "DisablePreservation" -Value 1 -Type String
如果 Exchange 安裝程式是在將 regkey 設定為 1之後執行,安裝程式將不會備份或還原任何組態中的任何索引鍵/值組。
| 登錄機碼 | 登錄值 | Exchange 設定行為 |
|---|---|---|
DisablePreservation (類型: REG_SZ) |
1 | 組態檔中的所有索引鍵值組都會重設,而且不會儲存預先升級組態的備份 (此行為相當於先前的 CU 升級) 。 |
DisablePreservation (類型: REG_SZ) |
NULL | 安裝程式會建立 preupgrade 組態的備份,並將 preupgrade 設定中的特定索引鍵/值組保留到新的組態。 |
DisablePreservation (類型: REG_SZ) |
任何其他值 | 安裝程式會建立 preupgrade 組態的備份,並將 preupgrade 設定中的特定索引鍵/值組保留到新的組態。 |
如果安裝程式無法將所有設定還原至先前的狀態,則會顯示警告。
自動模式
出席模式
在下一個步驟中,系統管理員可以分析安裝程序記錄檔,以查看無法保留哪些設定。 記錄檔中可能會有一或多個專案,以指出無法保留哪些設定:
- 讀取組態檔時發生例外狀況:
<configFileName>。 略過保留。 - 將變更儲存
<Preservation cmdlet name>至 時發生例外狀況:<configFileName>。 - 組態檔的架構驗證期間發生例外狀況:
<configFileName>。 略過保留。 -
<Preservation cmdlet name>失敗:<configFileName>
系統管理員可以覆寫安裝程式所建立的檔案,手動將任何組態檔從備份位置複製到必要位置。 這也會將這些檔案還原至其預先設定狀態。