Blog
By Andreas Zuckerhut on 7/2/2010 11:57:52 AM • Rank (2653) • Views 2893
1

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

Latest Media - View All Media (1)
   
Read More
Comments (4) - Comment RSS
Tommy Gunn wrote: on Jul 02, 2010 12:01 PM
Totally freakin awesome man. I have wanted to get icons like this for such a long time. Thanks for a GREAT script!
El Pea wrote: on Jul 02, 2010 12:40 PM
Thanks for the script, run fine and it´s very helpful
Stefan Koell wrote: on Jul 02, 2010 02:21 PM
I'm just saying "System.Drawing.Image: it will do a lot of magic for you" - and bam! Look at this: Kudos, Mr. Wachenhut ;-)
Jeremy wrote: on Jul 30, 2011 09:11 PM
Very nice script.. Is there any place on this site the defines the icons?


Who Viewed
Who Reviewed
Categories
Tags
Management Pack Icon Powershell Export
Related Pages
Shortened URL
http://tinyurl.com/37yrozs

Top Contributors
Featured Members
Pete Zerger
Points: 65622
Level: System Center Expert
Tommy Gunn
Points: 42748
Level: System Center Expert
Simon Skinner
Points: 40804
Level: System Center Expert
Stefan Koell
Points: 28999
Level: System Center Expert
Andreas Zuckerhut
Points: 27734
Level: System Center Expert