Remove-CMMaintenanceWindow

Removes a maintenance window.

Syntax

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

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

-Collection
Type:IResultObject
Required:True
Position:0
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-CollectionId

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

Type:String
Required:True
Position:0
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-CollectionName
Type:String
Required:True
Position:0
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-MaintenanceWindowName
Type:String
Aliases:Name
Required:True
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
Required:False
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-DisableWildcardHandling

Indicates that wildcard handling is disabled.

Type:SwitchParameter
Required:False
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
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ForceWildcardHandling

Indicates that wildcard handling is enabled.

Type:SwitchParameter
Required:False
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
Required:False
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False