
Update SQLTaskSiteStatus set RunNow = '1' where taskName = '$TaskName' and SiteNumber = '$SiteNumber'ĭATEDIFF(ss,LastStartTime,LastCompletionTime)Įnsure all Site Maintenance Tasks are up and running $ConfigMgrCon.ExecuteMethod('SMS_SQLTaskStatus','RunTaskNow',$MethodParam) $MethodParam.Add('TaskName',$($MT.TaskName)) $MethodParam.Add('SiteCode',$($SiteCode)) $MT = Get-CMSiteMaintenanceTask -SiteCode $SiteCode -Name 'Delete Aged Scenario Health History' Powershell ( Credits go to Herbert Fuchs for this script): Reference for maintenance tasks in Configuration ManagerĮnforce a Site Maintenance Task to ‘run now’: Maintenance tasks for Configuration Manager Only the ‘Backup SMS Site Server’ Task will terminate other running t asks, to ensure and enforce its own completion. If the timeframe is over or nears to end shortly, the t ask will or may not be started and wait s until the next scheduled run. If there is a n open s lot during the defined timeframe, the t ask will be executed. Configuration Manager controls the amount and sequence of all scheduled tasks and continuously evaluates, if there is enough time left to start and complete the next task within the allowed timeframe. Note: Y ou cannot d efine the exact start time of the individual task. the age of data ) and the schedul e, in which this t ask attempt s to run and perform the intended operation. If you open one of these t asks, you can e nable /disable it, define the data scope ( e.g. Starting with Configuration Manager Version 1906, there is an additional category at the bottom of the console. The Site Maintenance Tasks are located at:Īdministration > Overview > Site Configuration > Sites > Properties > Site Maintenance The MEMCM built-in Maintenance Task s can be configured and used to automatically clean up obsolete and old d ata from your Configuration Manager d atabase. Disable Site Maintenance Tasks for Hierarchy Updates.


This b log post will cover the following t opics:

In some of my p revious e ngagements I have been analysing and troubleshoot Site Maintenance Task related problems and developed a s trategy to i mprove Site Maintenance Tasks. My n ame is Fabian Schlagenhaufer, Customer Engineer (CE – formerly known as PFE) at Microsoft Germany for Microsoft Endpoint Manager related topics.
