Display a Maintenance Window for an SCCM Collection

This function is based on the original code from Nickolaj Andersen that you can find here GitHub Get-MaintenanceWindows.ps1 however I have modified this to allow for Verbose output and to specify the day, month and year for which you want to determine the Maintenance Window. In addition since I work a lot with non-recurring Maintenance […]

Continue reading

Remove a Maintenance Window from a specified SCCM Collection

This function removes a Maintenance Window from a collection based on either the provided name or ServiceWindowSchedules ID that you can see when performing a WMI query for collection information. You can also provide an asterisk in the name to indicate a wildcard is used to identify a set of Maintenance Windows should you use […]

Continue reading

Function to create and set a Maintenance Window on a specified SCCM Collection

This function creates a new Service Window/Maintenance Window for a Configuration Manager collection all using WMI but does require the other previously posted functions in order to perform as expected. This prevents the need to use the other functions separately to create the Maintenance Window and performs a verification once the Maintenance Window has been […]

Continue reading

Set Maintenance Window on an SCCM Collection using PowerShell

This function creates a new Service Window/Maintenance Window for a Configuration Manager collection all using WMI so you do not need the Configuration Manager cmdlets which sometimes can be frustrating to use. This function requires a schedule token as input which can be created using the New-ScheduleToken function. The base code of this function can […]

Continue reading

Create a Schedule Token for usage within SCCM

A PowerShell function that creates a recurring or non-recurring schedule token for usage within Configuration Manager. The output of this function is needed for the New-SMSServiceWindow function I have also posted but this function also relies on the function Convert-NormalDateToConfigMgrDate in order to create a usable schedule token. In short if you want to create […]

Continue reading