|
|
 
1 |
WARNING: This script was tested. However, I will not take responsibility for any damage this script might cause due to unexpected behaviour.
What does it do?
Powershell Script (For Operations Manager Shell) that exports all Images in the current Management Group's Management Packs into png files to some predefined DestinationPath.
There's a DestinationPath variable that you can modify, all images will be stored in this path in a subfolder that matches the Management Pack Name of the Image. The path provided in DestinationPath has to exist, otherwise the Script won't do anything.
The Subfolders for the Management Packs will be automatically created.
Find the script at the bottom of the screen (Download button).
Why would I need that?
This is the pimped version of the script that I wrote after reading this thread.
We also needed these icons once but we did it the good old way: Screenshot, MSPaint, Save. Yea, that was back when we didn't know that there are theoretically no limits in Operations Manager 2007.
So, what I basically did was:
- Get all Management Packs
- Get the Images in the Management Pack
- Output the Memory Stream of the ImageData to [System.Drawing.Image]::FromStream
- Save the Image as .png
You can of course change the Format, I have documented this in the Script. Basically there are 2 lines which handles this:
- One for the filename which changes the fileending: if (!($FileName.EndsWith(".png"))) { $FileName = $FileName + ".png" }
- One for the save format: $ImageFile.Save($FileName, [System.Drawing.Imaging.ImageFormat]::PNG)
Available Formats: BMP, EMF, EXIF, GIF, Icon, Jpeg, MemoryBMP, PNG, TIFF, WMF
Read More