SCCM 2012 R2 Slow Collection Refresh/Membership Update



If you are having problems with collections taking a long time to refresh membership, it is very possible that you have incremental updates or collection membership evaluation schedule set of happen frequently on a large number of collections.

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 (

[parameter(Mandatory=$true, ValueFromPipeline=$true)]



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


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

import-module ($Env:SMS_ADMIN_UI_PATH.Substring(0,$Env:SMS_ADMIN_UI_PATH.Length-5) + '\ConfigurationManager.psd1')

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







This website and its content is copyright of ITHierarchy Inc - © ITHierarchy Inc 2013-2015. All rights reserved.

Any redistribution or reproduction of part or all of the contents in any form is prohibited other than the following:

  • you may print or download to a local hard disk extracts for your personal and non-commercial use only
  • you may copy the content to individual third parties for their personal use, but only if you acknowledge the website as the source of the material

You may not, except with our express written permission, distribute or commercially exploit the content. Nor may you transmit it or store it in any other website or other form of electronic retrieval system.