Remove-CMMaintenanceWindow

Removes a maintenance window.

Syntax

Remove-CMMaintenanceWindow
      [-CollectionId] <String>
      -MaintenanceWindowName <String>
      [-Force]
      [-DisableWildcardHandling]
      [-ForceWildcardHandling]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Remove-CMMaintenanceWindow
      [-CollectionName] <String>
      -MaintenanceWindowName <String>
      [-Force]
      [-DisableWildcardHandling]
      [-ForceWildcardHandling]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Remove-CMMaintenanceWindow
      [-InputObject] <IResultObject>
      -MaintenanceWindowName <String>
      [-Force]
      [-DisableWildcardHandling]
      [-ForceWildcardHandling]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

The Remove-CMMaintenanceWindow cmdlet removes a maintenance window associated with a collection. If you remove a maintenance window during that window, the maintenance updates finish installation.

Examples

Example 1: Remove a maintenance window

PS C:\> Remove-CMMaintenanceWindow -Name "Distribution Point Maintenance" -CollectionId "AAA0004D"

This command removes the maintenance window Distribution Point Maintenance. The window is part of the collection AAA0004D.

Required Parameters

-CollectionId

Specifies the ID of the collection that the maintenance window applies to.

Type:String
Position:0
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-CollectionName
Type:String
Position:0
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InputObject
Type:IResultObject
Aliases:Collection, Site
Position:0
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-MaintenanceWindowName
Type:String
Aliases:Name
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Optional Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-DisableWildcardHandling

DisableWildcardHandling treats wildcard characters as literal character values. Cannot be combined with ForceWildcardHandling.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Force

Forces the command to run without asking for user confirmation.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ForceWildcardHandling

ForceWildcardHandling processes wildcard characters and may lead to unexpected behavior (not recommended). Cannot be combined with DisableWildcardHandling.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False