DscLcmMaintenanceWindows defines maintenance windows during which DSC operates in ApplyAndAutoCorrect mode.
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 |
| Parameter | Attribute | DataType | Description | Allowed Values |
|---|---|---|---|---|
Mandatory |
Hashtable[] |
List of maintenance windows |
| 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 |
|
|
On |
String |
Week of month to start the maintenance window |
|
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