Does anyone know how to extract icons from existing management packs? I'd like to use some of the Microsoft icons in my own management packs (and Visios for my MPs), but cannot figure out how to extract the icons from within in the MP.
Hi,
I just tried this, it's actually possible. What you need to do first is to unseal the Management Pack using this
Next, you need to open the XML and search for <images>. You'll see all the images and there's a part called <imagedata>.
Copy everrything in between the imagedata tag and paste it into a HexEditor (tried it with Hex-Editor MX, downloaded it from some german site though).
Save as png. Done.
Actually, it's quite boring to do it this way right? Since I was all out of gum, here you go ;)
Run from Operations Manager Shell. Will get all Images in all Management Packs and drops them in the Destinationpath in a subfolder which has the name of the Management Pack.
Destinationpath has to exist, otherwise the Script will fail.
$DestinationPath = "C:\temp\images" foreach ($ManagementPack in (get-managementpack)) { trap { continue } # Create Folder for the MP $CurrentFolder = new-item (Join-Path $DestinationPath $ManagementPack.Name) -type Directory foreach ($Image in $ManagementPack.GetImages()) { $FileStream = new-Object System.IO.FileStream((Join-Path $CurrentFolder $Image.Name), [System.IO.Filemode]::Create) $Image.ImageData.WriteTo($FileStream) $FileStream.Flush() $FileStream.Close() if ($Error.Count -gt 0) { write-host "Couldn't extract Image " $Image.Name " from MP " $ManagementPack.Name; $Error.Clear() } } }