Get-CMMaintenanceWindow

Gets the maintenance windows for a collection.

Syntax

Get-CMMaintenanceWindow
   [-InputObject] <IResultObject>
   [-MaintenanceWindowName <String>]
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [<CommonParameters>]
Get-CMMaintenanceWindow
   [-CollectionId] <String>
   [-MaintenanceWindowName <String>]
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [<CommonParameters>]
Get-CMMaintenanceWindow
   [-CollectionName] <String>
   [-MaintenanceWindowName <String>]
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [<CommonParameters>]

Description

The Get-CMMaintenanceWindow cmdlet gets the maintenance windows for specified collections.

Note

Configuration Manager cmdlets must be run from the Configuration Manager site drive. The examples in this article use the site name XYZ. For more information, see the getting started documentation.

Examples

Example 1: Get maintenance windows

PS XYZ:\> Get-CMMaintenanceWindow -CollectionID "AAA0004D"

This command gets the maintenance windows for the specified collection.

Parameters

-CollectionId

Specifies an array of collection IDs.

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
-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
-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
-InputObject
Type:IResultObject
Aliases:Collection, Site
Position:0
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-MaintenanceWindowName
Type:String
Aliases:Name
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Inputs

Microsoft.ConfigurationManagement.ManagementProvider.IResultObject

Outputs

IResultObject[]