Handling Equivalent Objects in multiple VMM Libraries

Everyone who has to work with a central VMM management server installation and multiple VMM Libraries in different sites has to deal with the equivalent objects. Managing equivalent objects through the VMM console is not appropriate, if you have a lot of objects in your VMM Library.

-> https://technet.microsoft.com/en-us/library/gg610650.aspx

Some weeks ago I was faced again with the equivalent objects. So I decided to write some lines of PowerShell to lighten the marking of the equivalent objects.

I implemented the marking for ISO images, VHD images, scripts and custom resources in a PowerShell script. It is simple, but it works wonderful.

ISO Images:

foreach($ISO in $ISOs){
foreach($TEMPISO in $ISOs){
if($ISO.Name -eq $TEMPISO.Name -and $ISO.SharePath -ne $TEMPISO.SharePath){
Set-SCISO -ISO $ISO -FamilyName $Temp -Release ""

VHD Images:

foreach($VHD in $VHDs){
foreach($TEMPVHD in $VHDs){
if($VHD.Name -eq $TEMPVHD.Name -and $VHD.SharePath -ne $TEMPVHD.SharePath){
Set-SCVirtualHardDisk -VirtualHardDisk $VHD -FamilyName $Temp -Release ""


foreach($Script in $Scripts){
foreach($TEMPScript in $Scripts){
if($Script.Name -eq $TEMPScript.Name -and $Script.SharePath -ne $TEMPScript.SharePath){
Set-SCScript -Script $Script -FamilyName $Temp -Release ""

Custom Resources:

foreach($CR in $CRs){
foreach($TEMPCR in $CRs){
if($CR.Name -eq $TEMPCR.Name -and $CR.SharePath -ne $TEMPCR.SharePath){
Set-SCCustomResource -CustomResource $CR -FamilyName $Temp -Release ""

Leave a Reply