Set-CMSiteMaintenanceTask

Set-CMSiteMaintenanceTask

Changes settings for a Configuration Manager maintenance task.

Syntax

Parameter Set: SetMaintenanceTasksByName
Set-CMSiteMaintenanceTask -MaintenanceTask <MaintenanceTask> {BackupSiteServer | CheckApplicationTitleWithInventoryInformation | ClearUndiscoveredClients | DeleteAgedApplicationRequestData | DeleteAgedClientOperations | DeleteAgedClientPresenceHistory | DeleteAgedCollectedFiles | DeleteAgedComputerAssociationData | DeleteAgedDeleteDetectionData | DeleteAgedDevicesManagedByTheExchangeServerConnector | DeleteAgedDeviceWipeRecord | DeleteAgedDiscoveryData | DeleteAgedDistributionPointUsageStats | DeleteAgedEndpointProtectionHealthStatusHistoryData | DeleteAgedEnrolledDevices | DeleteAgedInventoryHistory | DeleteAgedLogData | DeleteAgedNotificationTaskHistory | DeleteAgedReplicationSummaryData | DeleteAgedReplicationTrackingData | DeleteAgedSoftwareMeteringData | DeleteAgedSoftwareMeteringSummaryData | DeleteAgedStatusMessages | DeleteAgedThreatData | DeleteAgedUnknownComputers | DeleteAgedUserDeviceAffinityData | DeleteInactiveClientDiscoveryData | DeleteObsoleteAlerts | DeleteObsoleteClientDiscoveryData | DeleteObsoleteForestDiscoverySitesAndSubnets | DeleteUnusedApplicationRevisions | EvaluateProvisionedAmtComputerCertificates | MonitorKeys | RebuildIndexes | SummarizeInstalledSoftwareData | SummarizeSoftwareMeteringFileUsageData | SummarizeSoftwareMeteringMonthlyUsageData} -SiteCode <String> [-BeginTime <DateTime> ] [-DaysOfWeek {Friday | Monday | Saturday | Sunday | Thursday | Tuesday | Wednesday}[] ] [-DeleteThanOlderDays <Int32> ] [-DeviceName <String> ] [-Enabled <Boolean> ] [-EnabledAlert <Boolean> ] [-LatestBeginTime <DateTime> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: SetSummaryTaskByName
Set-CMSiteMaintenanceTask -SummaryTask <SummaryTask> {UpdateApplicationCatalogTables} [-Enabled <Boolean> ] [-RunIntervalMinutes <Int32> ] [-RunNow <Boolean> ] [-Confirm] [-WhatIf] [ <CommonParameters>]




Detailed Description

The Set-CMSiteMaintenanceTask cmdlet changes settings for a Microsoft System Center 2012 SP1 Configuration Manager maintenance task.

Parameters

-BeginTime<DateTime>

Specifies the date and time at which a maintenance task starts.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-DaysOfWeek<DaysOfWeek[]>

Specifies an array of day names that determine the days of each week on which the maintenance task runs. The acceptable values for this parameter are:

-- Monday
-- Tuesday
-- Wednesday
-- Thursday
-- Friday
-- Saturday
-- Sunday


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-DeleteThanOlderDays<Int32>

Specifies the number of days before Configuration Manager deletes the maintenance task.


Aliases

DeleteOlderThan

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-DeviceName<String>

Specifies the name of the device on which the maintenance task runs.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Enabled<Boolean>

Indicates whether the maintenance task is enabled in Configuration Manager.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-EnabledAlert<Boolean>

Indicates whether alerts for the maintenance task are enabled in Configuration Manager.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-LatestBeginTime<DateTime>

Specifies a future date and time at which the maintenance task runs.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-MaintenanceTask<MaintenanceTask>

Specifies the name of a maintenance task. The acceptable values for this parameter are:

-- BackupConfigMgrSecondarySiteServer
-- BackupSiteServer
-- CheckApplicationTitleWithInventoryInformation
-- ClearUndiscoveredClients
-- DeleteAgedApplicationRequestData
-- DeleteAgedClientAccessLicenseData
-- DeleteAgedClientOperations
-- DeleteAgedClientPresenceHistory
-- DeleteAgedCollectedFiles
-- DeleteAgedComputerAssociationData
-- DeleteAgedConfigurationManagementData
-- DeleteAgedDeleteDetectionData
-- DeleteAgedDevicesManagedByTheExchangeServerConnector
-- DeleteAgedDeviceWipeRecord
-- DeleteAgedDiscoveryData
-- DeleteAgedEndpointProtectionHealthStatusHistoryData
-- DeleteAgedEnrolledDevices
-- DeleteAgedInventoryHistory
-- DeleteAgedLogData
-- DeleteAgedNotificationTaskHistory
-- DeleteAgedReplicationSummaryData
-- DeleteAgedReplicationTrackingData
-- DeleteAgedSoftwareMeteringData
-- DeleteAgedStatusMessages
-- DeleteAgedThreatData
-- DeleteAgedUnknownComputers
-- DeleteAgedUserDeviceAffinityData
-- DeletedAgedClientPresenceHistory
-- DeleteExpiredActivities
-- DeleteExpiredActivityFacts
-- DeleteExpiredBookmarks
-- DeleteInactiveClientDiscoveryData
-- DeleteObsoleteAlerts
-- DeleteObsoleteClientDiscoveryData
-- DeleteObsoleteForestDiscoverySitesAndSubnets
-- DeleteUnusedApplicationRevisions
-- EvaluateProvisionedAmtComputerCertificates
-- ExportSiteDatabaseTransactionLog
-- MonitorKeys
-- RebuildIndexes
-- ResetAmtComputerPasswords
-- SiteDatabase
-- SummarizeClientAccessLicenseWeeklyUsageData
-- SummarizeInstalledSoftwareData
-- SummarizeSoftwareMeteringFileUsageData
-- SummarizeSoftwareMeteringMonthlyUsageData
-- UpdateStatistics


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-RunIntervalMinutes<Int32>

Specifies the number of minutes that elapse between each run for the maintenance task.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-RunNow<Boolean>

Indicates whether Configuration Manager runs the maintenance task immediately.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-SiteCode<String>

Specifies the site code of the Configuration Manager site that hosts the site system role.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-SummaryTask<SummaryTask>

Specifies a summary maintenance task. The acceptable value for this parameter is UpdateApplicationCatalogTables.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before running the cmdlet.


Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

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


Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (http://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

Examples

Example 1: Set a maintenance task to run once a week

This command specifies that the maintenance task named Backup runs on Friday each week on the Configuration Manager site that has the site code CM1.


PS C:\> Set-CMSiteMaintenanceTask -SiteCode "CM1" -MaintenanceTaskName "Backup" -DaysOfWeek Friday

Related topics

Community Additions

ADD
Show: