$comCatalog = New-Object -ComObject COMAdmin.COMAdminCatalog $appColl = $comCatalog.GetCollection("Applications") $appColl.Populate() $app = $appColl | where {$_.Name -eq "ApplicationName"} $compColl = $appColl.GetCollection("Components", $app.Key) $compColl.Populate() $index = 0 foreach($component in $compColl) { if ($component.Name -eq "SOMECOMPONENT.NAME") { $compColl.Remove($index) $compColl.SaveChanges() } $index++ }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)