Get-​CM​Site​Maintenance​Task

Gets maintenance tasks in Configuration Manager.

Syntax

Get-CMSiteMaintenanceTask
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [-MaintenanceTaskName <String>]
   [-SiteCode <String>]
   [<CommonParameters>]

Description

The Get-CMSiteMaintenanceTask cmdlet gets maintenance tasks in Microsoft System Center Configuration Manager. A maintenance task is a task in System Center Configuration Manager that performs maintenance on sites and databases.

Examples

Example 1: Get a maintenance task

PS C:\> Get-CMSiteMaintenanceTask -SiteCode "CM1" -MaintenanceTaskName "Backup"

This command gets the maintenance task named Backup for the Configuration Manager site that has the site code CM1.

Optional Parameters

-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
-MaintenanceTaskName

Specifies an array of names for maintenance tasks.

Type:String
Aliases:ItemName
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SiteCode

Specifies the site code of the Configuration Manager site.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False