We like to have a custom icon on all of our bundles, however editing them manually can take a while when you have 100s of bundles to edit.
A way to add an icon to multiple bundles at once would save lots of time.
by: Daniel F. | over a year ago | Other
Comments
Great Idea
I like the idea of taking a bundle icon and applying it to another bundle. Sometimes the original icon cannot be found as we had found out during a migration process.
You can get there painlessly using the undocumented SOAP API. Quick&Dirty Powershell code:
$ZCMServer = "localhost"
$SourceBundlePath = "/Bundles/Applications/My Bundle With Icon"
$DestBundlePath = "/Bundles/New/Iconless Bundle"
$ZenCredential = Get-Credential -Message "Please provide login data to your ZCM server"
# Connect to Zenworks SOAP web service
$SOAPBundleAdmin = New-WebServiceProxy -Uri "http://$ZCMServer/zenworks-bundleadmin/?wsdl" -Credential $ZenCredential
# get the icon from $SourceBundlePath
$BundleIcon = $SOAPBundleAdmin.getBundleIcon($SourceBundlePath)
# set the icon on $DestBundlePath
$SOAPBundleAdmin.setBundleIcon($DestBundlePath, $BundleIcon)