Skip to content

Latest commit

 

History

History
123 lines (102 loc) · 2.79 KB

File metadata and controls

123 lines (102 loc) · 2.79 KB

DSC Resource 'DscLcmMaintenanceWindows'

DscLcmMaintenanceWindows defines maintenance windows during which DSC operates in ApplyAndAutoCorrect mode.

When to use 'DscLcmMaintenanceWindows'

Use this resource when you want to restrict DSC auto-correction to specific time windows (e.g., nights or weekends). Outside these windows, DSC will only monitor for drift but not auto-correct, reducing the risk of unexpected configuration changes during business hours.

Source

DSC Resource

Documentation

Table 1. Attributes of category 'DscLcmMaintenanceWindows'
Parameter Attribute DataType Description Allowed Values

MaintenanceWindows

Mandatory

Hashtable[]

List of maintenance windows

Table 2. Attributes of category 'DscLcmMaintenanceWindows/MaintenanceWindows'
Parameter Attribute DataType Description Allowed Values

Name

Key

String

Display name of the maintenance window

StartTime

Mandatory

String

Start time of the maintenance window

Timespan

Mandatory

Timespan

Timepan of the maintenance window

DayOfWeek

String

Weekday to start the maintenance window

  • monday

  • tuesday

  • wednesday

  • thursday

  • friday

  • saturday

  • sunday

On

String

Week of month to start the maintenance window

  • 1st

  • 2nd

  • 3rd

  • 4th

  • last

Example
DscLcmMaintenanceWindows:
  MaintenanceWindows:
    - Name:      EveryDay
      StartTime: 00:00:00
      Timespan:  02:00:00
    - Name:      MW-1
      DayOfWeek: friday
      On:        2nd
      StartTime: 02:30:00
      Timespan:  02:00:00
    - Name:      MW-2
      DayOfWeek: monday
      On:        last
      StartTime: 04:00:00
      Timespan:  01:00:00