Close Menu
    Facebook X (Twitter) Instagram
    Saturday, October 11
    X (Twitter) LinkedIn Reddit RSS
    All about Endpoint Management
    • Home
    All about Endpoint Management
    Home»CM2012»SCCM Configmgr Powershell script to remove the Maintenance Window on list of collections

    SCCM Configmgr Powershell script to remove the Maintenance Window on list of collections

    Eswar KonetiBy Eswar KonetiSeptember 08, 9:45 am2 Mins Read CM2012 5,119 Views
    Share
    Facebook Twitter LinkedIn Reddit

     

    Maintenance windows in SCCM Configmgr enable you to define a time when SCCM operations can be carried out on members of a device collection. These maintenance windows are helpful to ensure that client configuration changes occur during periods that do not affect the productivity of the organization. More information about  Maintenance windows refer https://docs.microsoft.com/en-us/sccm/core/clients/manage/collections/use-maintenance-windows

    I had requirement to remove all Maintenance windows that are set on list of collections .Removing the Maintenance windows for each collection would be tedious task. Right click on collection ,select maintenance window and delete the Maintenance window.

    Note:Removing the Maintenance windows allow to install deployments that are pushed to collections.

    In this blog post, we will see how powershell can do this task in seconds for any number of collections that you pipe into txt file.

    All you need is ,get the list of Collection IDs and supply it to text file ,run the script.

    This script will not output any results to log file saying what is the existing Maintenance window and what is deleted. If you want ,you can customize the script to log the output.

    This script uses 2 basic powershell cmdlets available in configuration manager module which are

    Get-CMMaintenanceWindow Gets the maintenance windows for a collection

    Remove-CMMaintenanceWindow Removes a maintenance window associated with a collection

    image

    Download the powershell script from Technet Gallary ,supply the list of collection IDs ,run the script.

    Collections configmgr Get-CMMaintenanceWindow maintenance Window Operations Powershell Remove Maintenance Window Remove-CMMaintenanceWindow SCCM
    Share. Twitter LinkedIn Email Facebook Reddit

    Related Posts

    Export Microsoft Entra ID User Authentication Methods to CSV using PowerShell & Microsoft Graph API

    August 13, 2:08 pm

    SCCM SQL Report – Compare Installed Apps on TWO Different Computers

    July 13, 10:35 am

    Exporting Intune Win32 Apps with All Properties Using PowerShell and Microsoft Graph

    June 30, 7:01 pm

    Leave a ReplyCancel reply

    This site uses Akismet to reduce spam. Learn how your comment data is processed.

    Sign Up

    Get email notifications for new posts.

    Author

    I’m Eswar Koneti ,a tech enthusiast, security advocate, and your guide to Microsoft Intune and Modern Device Management. My goal? To turn complex tech into actionable insights for a streamlined management experience. Let’s navigate this journey together!

    Support

    Awards

    Archives

    © Copyright 2009-2025 Eswar Koneti, All rights reserved.

    Type above and press Enter to search. Press Esc to cancel.