How to sync the Software Update Point (ConfigMgr) via Powershell

1 minute read

Here is another short script you can use on your way to automate every task in your ConfigMgr environment.

Syncing the SUP in ConfigMgr 2012

Synchronizing the Software Update Point in a ConfigMgr environment can happen in two ways - automatically or manually.

This can be configured in your site component’s configuration:

Software Update Point configuration

In there you can configure the SUP to synchronize on a schedule or not. If you don’t use a schedule, you’ll have to sync manually.

Sometimes you want to do both. Maybe one schedule is so far apart from the next and you want to sync manually in-between?

Two ways to do that aswell 😉

Synchronizing the SUP manually means log on to the console, go to your Software Library, choose the Software Updates node and then “All Software Updates”. You’ll then see a “Synchronize Software Updates” button in the upper ribbon.

synchronize SUP manually

Hit that button to synchronize the SUP.

How to use Powershell to sync SUP

You can also use this sript to sync your SUP without logging into your console or even your admin server. This script can also be used inside an Orchestrator Runbook (will show that at a later point).

It basically calls a method (SyncNow) from the SMS_SoftwareUpdate class.

Execute the script like this:

.\sync-SUP.ps1 -SMSProvider %NameOfSMSProvider% -verbose

The verbose switch is optional and will give you a bit of output in the end.

Here’s the script, you can also download it here:

[CmdletBinding( SupportsShouldProcess = $False, ConfirmImpact = "None", DefaultParameterSetName = "" )]


Function Get-SiteCode
    $wqlQuery = “SELECT * FROM SMS_ProviderLocation”
    $a = Get-WmiObject -Query $wqlQuery -Namespace “root\sms” -ComputerName $SMSProvider
    $a | ForEach-Object {
            $siteCode = $_.SiteCode

return $sitecode | Out-Null


$SUP = [wmiclass]("\\$SMSProvider\root\SMS\Site_$($SiteCode):SMS_SoftwareUpdate")
$Params = $SUP.GetMethodParameters("SyncNow")
$Params.fullSync = $true
$Return = $SUP.SyncNow($Params)

if ($Return.ReturnValue -eq "0")
        Write-Verbose "Sync of SUP successful"
        Write-Verbose "There was an error syncing the SUP"


Leave a Comment