SCCM 2012 R2 Slow Collection Refresh/Membership Update




Rule of thumb:

  • limit incremental collection evaluation to no more than 200  collections
  • limit colection evaluation schedule to no more than 1 time in 4 hours.


So now you have 1600 collections set at incremental updates, what do you do? You could manually change each and every collection... that will take days, so I slapped together a powershell script to do it for you. In this script it does not change the Membership Evaluation for the default collection or "*All Systems" since I need those to stay incremental. you will need to set the $SMSProvider variable in the beginning of the script to the server that has the SMS provider. Normally this is the Primary site server or SQL server. Also change the  $SiteCode variable to your SCCM site code. :


$SMSProvider="<SMSPrivider ServerName>"


Function create-ScheduleToken {

$SMS_ST_RecurInterval = "SMS_ST_RecurInterval"

$class_SMS_ST_RecurInterval = [wmiclass]""

$class_SMS_ST_RecurInterval.psbase.Path ="\\$SMSProvider\ROOT\SMS\Site_$($SiteCode):$($SMS_ST_RecurInterval)"


$script:scheduleToken = $class_SMS_ST_RecurInterval.CreateInstance()



$scheduleToken.DayDuration = 0

$scheduleToken.DaySpan = 1

$scheduleToken.HourDuration = 0

$scheduleToken.HourSpan = 0

$scheduleToken.IsGMT = $false

$scheduleToken.MinuteDuration = 0

$scheduleToken.MinuteSpan = 0

$scheduleToken.StartTime = (Convert-NormalDateToConfigMgrDate $startTime)





Function Convert-NormalDateToConfigMgrDate {


param (




return [System.Management.ManagementDateTimeconverter]::ToDMTFDateTime($starttime)


[datetime]$startTime = [datetime]::Today


Get-WmiObject sms_collection -computer "$SMSProvider" -namespace "root\SMS\Site_$($SiteCode)" | foreach {


$Coll = [wmi] $_.__Path

if (($Coll.RefreshType -eq 4 -or $Coll.RefreshType -eq 6) -and $coll.Name -notlike "*All Systems" -and $coll.CollectionID -notlike "SMS*") {


write-host $Coll.CollectionID "`t" $Coll.Name


$coll.RefreshType =2









