Update existing SCCM Applications created with RuckZuck

If you are using RuckZuck for ConfigurationManager, you may want to get the latest version of all your imported RuckZuck Applications in SCCM.

You just have to run the following PowerShell Script on a Machine with RZ4ConfigMgr installed (and the SCCM Console).

#Import SCCM PowerShell Module
import-module (Join-Path $(Split-Path $env:SMS_ADMIN_UI_PATH) ConfigurationManager.psd1)  
cd ((Get-PSDrive -PSProvider CMSite).Name + ':')

#Load the RZ4ConfigMgr Assembly
[System.Reflection.Assembly]::LoadFrom((Join-Path $(Split-Path $env:SMS_ADMIN_UI_PATH) RZ4ConfigMgr.exe)) | Out-Null

#Get all existing RuckZuck Applications and run an Import with the same "Shortname". RZ will only create the App if it does not exist....
(Get-CMApplication | Where-Object LocalizedCategoryInstanceNames -eq {RuckZuck}).SDMPackageXML | % { ([xml]$_).AppMgmtDigest.Application.CustomProperties.Property | ? { $_.Name -eq "Shortname" } | select -ExpandProperty Value } | % { $RZ = New-Object RZ2CM12.PSRZ4ConfigMgr; $RZ.Productname = "$($_)"; $RZ.Run(); }

The Script is searching for Applications in the Admin category "RuckZuck" and extracts the RuckZuck-Shortname from the "custom properties" of the App. Then it triggers an import of that Shortname. RZ4ConfigMgr will get the latest Version of the Product and checks if it's already in SCCM. If it's missing, it will create a NEW Application and Collection for the new Product-Version...

Note: it checks every existing Application; it may take a "moment" to complete...

Requirements:

  • RuckZuck for ConfigMgr must be Installed (RZ4ConfigMgr.exe must exist in the Bin Directory of the SCCM Admin Console)
  • RZ4ConfigMgr.exe.config must be configured (specially the CM12ContentSourceUNC must point to a valid UNC Path to store all the package Sources )
  • the existing Applications must be created with RuckZuck ( Application must have a Custom property for the Shortname and the RuckZuck Package-ID )
  • RZ4ConfigMgr Version >= 0.9.9.9