如何在 Configuration Manager 中使用维护时段How to use maintenance windows in Configuration Manager

适用范围:Configuration Manager (Current Branch)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 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: