如何使用 Configuration Manager 中的維護時段How to use maintenance windows in Configuration Manager

適用於:Configuration Manager (最新分支)Applies to: Configuration Manager (current branch)

使用維護時段來定義 Configuration Manager 何時可以在裝置上執行會造成影響的工作。Use maintenance windows to define when Configuration Manager can run impacting tasks on devices. 維護時段有助於確保用戶端設定變更在不影響生產力的時間內進行。Maintenance windows help make sure that client configuration changes occur during times that don't affect productivity. 透過 [軟體中心],使用者可以在 [安裝狀態] 索引標籤上看到裝置的下一個維護時段。With Software Center, users can see the device's next maintenance window on the Installation status tab.

下列工作支援維護時段:The following tasks support maintenance windows:

  • 應用程式與套件部署Application and package deployments

  • 軟體更新部署Software update deployments

  • 相容性設定部署和評估Compliance settings deployment and evaluation

  • OS 與自訂工作順序部署OS and custom task sequence deployments

使用有效日期、開始時間與結束時間,以及週期模式來設定維護時段。Configure maintenance windows with an effective date, a start and end time, and a recurrence pattern. 視窗的持續時間上限必須小於 24 小時。The maximum duration of a window has to be less than 24 hours. 主控台不允許超過 24 小時的單一維護時段。The console doesn't allow a single maintenance window longer than 24 hours. 例如,如果您想要允許星期六與星期日全天進行維護,則針對每一天建立兩個 24 小時的維護時段。For example, if you want to allow maintenance all day Saturday and Sunday, then create two 24-hour maintenance windows for each day.

根據預設,部署造成電腦重新啟動的行為不允許出現在維護時段之外,但是您可以覆寫預設值。By default, computer restarts caused by a deployment aren't allowed outside of a maintenance window, but you can override the default. 維護時段只會影響部署執行的時間。Maintenance windows affect only the time when the deployment runs. 您設定要在本機下載並執行的部署,可以在時段外下載內容。Deployments that you configure to download and run locally can download content outside of the window.

如果用戶端電腦是維護時段的裝置集合成員,只有在其允許的執行時間上限未超過時段持續時間的情況下,部署才會執行。When a client is a member of a device collection that has a maintenance window, a deployment runs only if its maximum allowed run time doesn't exceed the duration of the window. 如果部署無法執行,用戶端會產生警示。If the deployment fails to run, the client generates an alert. 然後,其會在下一個排定的維護時段內重新執行部署。It then reruns the deployment during the next scheduled maintenance window that has available time.

多個維護時段Multiple maintenance windows

如果用戶端電腦是具有維護時段之多個裝置集合的成員,則適用下列規則:When a client computer is a member of multiple device collections that have maintenance windows, these rules apply:

  • 如果維護時段未重疊,用戶端會將其視為兩個獨立的維護時段。If the maintenance windows don't overlap, the client treats them as two independent maintenance windows.

  • 如果維護時段重疊,則用戶端會在兩個時段的整個時間內將其視為一個時段。If the maintenance windows overlap, the client treats them as a single window for the entire time of both windows. 例如,您在集合上建立兩個維護時段。For example, you create two maintenance windows on a collection. 第一個是從 6:00 到 7:00,第二個則是從 6:30 到 7:30 生效。The first is effective from 6:00 to 7:00, and the second is effective from 6:30 to 7:30. 由於其重疊 30 分鐘,因此合併維護時段的有效持續時間為 90 分鐘,從 6:00 到 7:30。Because they overlap by 30 minutes, the effective duration of the combined maintenance window is 90 minutes from 6:00 to 7:30.

當使用者從 [軟體中心] 安裝應用程式時,用戶端會立即加以啟動。When a user installs an application from Software Center, the client starts it immediately. 其會優先處理使用者對管理員的意圖。It prioritizes the user's intent over the administrator's.

在軟體中心中,如果在使用者設定的非上班時間裡有 [必要] 目的的應用程式部署達到安裝期限,用戶端就會安裝應用程式。If an application deployment with a purpose of Required reaches its installation deadline during the non-business hours that a user configures in Software Center, the client installs the application. 其會優先處理使用者的管理員意圖。It prioritizes the administrator's intent over the user's.

根據預設,有多個維護時段,用戶端只會在 [軟體更新] 類型時段期間安裝軟體更新。By default, with multiple maintenance windows, the client only installs software updates during Software Update type windows. 除非是唯一的類型,否則會忽略 [所有部署] 的維護時段。It ignores any All deployments maintenance windows, unless they're the only type. 您可以使用軟體更新群組中的下列用戶端設定來設定此行為:當 [軟體更新] 維護視窗可以使用時,允許安裝 [所有部署] 維護視窗中的軟體更新You can configure this behavior with the following client setting in the Software updates group: Enable installation of software updates in "All deployments" maintenance window when "Software Update" maintenance window is available. 如需詳細資訊,請參閱關於用戶端設定For more information, see About client settings.

注意

此設定也適用於您設定以套用至工作順序的維護時段。This setting also applies to maintenance windows that you configure to apply to Task sequences.

如果用戶端只有 [所有部署] 時段可用,其仍會在該時段安裝軟體更新或工作順序。If the client only has an All deployments window available, it still installs software updates or task sequences in that window.

設定維護時段Configure maintenance windows

  1. 在 Configuration Manager 主控台中,移至 [資產與合規性] 工作區。In the Configuration Manager console, go to the Assets and Compliance workspace.

  2. 選取 [裝置集合] 節點,然後選取一個集合。Select the Device Collections node, and then select a collection.

    注意

    您無法為 [所有系統] 集合建立維護時段。You can't create maintenance windows for the All Systems collection.

  3. 在功能區 [常用] 索引標籤的 [內容] 群組中,選擇 [內容]。On the Home tab of the ribbon, in the Properties group, choose Properties.

  4. 切換至 [維護時段] 索引標籤,然後選取 [新增] 圖示。Switch to the Maintenance Windows tab, and select the New icon.

    1. 指定 [名稱] 以唯一識別此集合的維護時段。Specify a Name to uniquely identify this maintenance window for the collection.

    2. 設定 [時間] 設定:Configure the Time settings:

      • 生效日期:維護時段的開始日期。Effective date: The date when the maintenance windows starts. 預設值是目前的日期。The default is the current date.

      • 開始結束:維護時段的開始與結束時間。Start and End: The start and end times of the maintenance window. 其會計算時段的持續時間It calculates the Duration for the window. 最短持續時間為五分鐘,最大值為 24 小時。The minimum duration is five minutes, and the maximum is 24 hours. 預設持續時間是三小時,從 01:00 到 04:00。The default duration is three hours, from 01:00 to 04:00.

      • 國際標準時間 (UTC) :啟用此選項可讓用戶端以 UTC 時區來解譯開始與結束時間。Coordinated Universal Time (UTC): Enable this option for the client to interpret the start and end times in the UTC time zone. 針對相同集合中的區域或全域散發裝置,此選項會將維護時段設定為在集合中的所有裝置上同時執行。For regionally or globally distributed devices in the same collection, this option sets the maintenance window to occur simultaneously on all devices in the collection. 請停用此選項,讓用戶端使用裝置的本地時區。Disable this option for the client to use the device's local time zone. 預設會停用這個選項。This option is disabled by default.

    3. 設定週期模式。Configure the recurrence pattern. 預設值是一週的目前日期每週一次。The default is once per week on the current day of the week.

    4. 將此排程套用至:根據預設,此時段適用於所有部署Apply this schedule to: By default the window applies to All deployments. 您可以選取 [軟體更新] 或 [工作順序],進一步控制在此時段中執行的部署。You can select either Software updates or Task sequences to further control what deployments run during this window.

      提示

      如果您在相同的集合上設定多個不同類型的維護時段,請確定您了解用戶端行為。If you configure multiple maintenance windows of different types on the same collection, make sure you understand the client behaviors. 如需詳細資訊,請參閱多個維護時段For more information, see Multiple maintenance windows.

  5. 選取 [確定] 以儲存並關閉時段。Select OK to save and close the window.

集合屬性的 [維護時段] 索引標籤會顯示所有已設定的時段。The Maintenance Windows tab of the collection properties displays all configured windows.

使用 PowerShellUse PowerShell

PowerShell 可用來設定維護期間。PowerShell can be used to configure maintenance windows. 如需詳細資訊,請參閱下列文章:For more information, see the following articles: