How to Force Content Update for SCCM 2012 Applications When Scripts Change


6 views

When you modify application source files in SCCM 2012 (especially script-based installations), you'll often find distribution points (DPs) stubbornly serving outdated content. This typically occurs when:

  • Updating PowerShell/VBScript installation scripts
  • Modifying XML configuration files
  • Changing batch files in your package

Here's the definitive procedure to ensure DPs serve fresh content:

# Example SCCM PowerShell commands for content refresh
Update-CMDistributionPoint -ApplicationName "YourApp" -DeploymentTypeName "ScriptInstall" -RefreshDistributionPoint

When standard methods fail, try these advanced approaches:

  1. Increment the version in Application Properties > References tab
  2. Delete old revisions via Monitoring > Distribution Status > Content Status
  3. Manual DP reset (for emergency cases):
# WMI method to force content expiration
$app = Get-WmiObject -Namespace "root\SMS\site_ABC" -Class SMS_Application | Where-Object {$_.LocalizedDisplayName -eq "YourApp"}
$app.ExpireContent("ALL", $true)

After updating content, always verify:

  • Check "Content Status" in Monitoring workspace
  • Validate last refresh time on DP properties
  • Test deployment on fresh client machine

For script-based deployments, consider adding version validation:

# Sample detection method script
$scriptVersion = "2.1.1" # Update this with each change
if ((Test-Path "C:\Program Files\YourApp\version.txt") -and 
    ((Get-Content "C:\Program Files\YourApp\version.txt") -eq $scriptVersion)) {
    Write-Output "Installed"
}

For frequent updates, implement this CI/CD approach:

  1. Store installation scripts in source control
  2. Configure build pipeline to update SCCM content
  3. Auto-increment version numbers

When working with SCCM 2012 application deployments, one frustrating scenario occurs when you update your application content but clients keep receiving the old version from Distribution Points (DPs). This typically happens when:

  • Script-based applications get modified during testing
  • Content revisions aren't properly propagated
  • DP caching mechanisms interfere with updates

Here's the correct sequence to ensure your updated content reaches all DPs:

  1. Update your source files in the original content location
  2. In the SCCM console, right-click the application and select "Update Content"
  3. Choose "Redistribute" to push changes to all DPs
  4. Optionally, select "Update Distribution Points" for critical updates

For frequent updates, consider automating the process with PowerShell:


# Update SCCM application content and redistribute
$ApplicationName = "YourAppName"
$App = Get-CMApplication -Name $ApplicationName
Update-CMDistributionPoint -Application $App -Confirm:$false

If DPs still serve old content after redistribution:


# Force content cleanup on problematic DP
Invoke-CMContentDistributionCleanup -DistributionPointName "YourDPName" -ApplicationName $ApplicationName

SCCM maintains content versions for rollback capability. To completely purge old versions:


# Remove all but the latest revision
Get-CMContentDistribution -ApplicationName $ApplicationName | 
Where-Object {$_.ContentVersion -ne (Get-CMApplication -Name $ApplicationName).CurrentVersion} | 
Remove-CMContentDistribution -Force

Verify content updates using:


# Check distribution status
Get-CMContentDistributionStatus -ApplicationName $ApplicationName | 
Select-Object DistributionPointName, State, LastStatusTime | 
Format-Table -AutoSize