Adding Images to OpsMgr 2012 Management Packs in VSAE
While I was working on the recently published ConfigMgr 2012 Client MP in VSAE, I needed to add few images as icons for the ConfigMgr 2012 Client class that I defined. I couldn’t find any articles on the net explaining how to do so in VSAE for OpsMgr MP’s. Instead, I found this article on how to do it for a Service Manager MP.
It wasn’t too hard to figure out how to do this for OpsMgr MPs, all I had to do is to look at the Microsoft.SystemCenter.Library in VSAE. It turned out adding images for classes in OpsMgr 2012 Mps is a bit different than Service Manager MPs. Since I couldn’t find any blog articles on how to do this for OpsMgr MP’s, I’m documenting this process in this blog, it is also a note for myself as future references. Below is what I had to do:
- Adding the big (80x80) and small (16x16) images to the MP as Embedded Resource
- Add the below XML code into a MP fragment file (IDs and file names needs to be updated accordingly):
<Categories> <Category ID="ConfigMgr.2012.Client.Library.ConfigMgr.2012.Client.Application.Diagram.Icon.Category" Target="ConfigMgr.2012.Client.Library.ConfigMgr.2012.Client.Application.Diagram.Icon" Value="System!System.Internal.ManagementPack.Images.DiagramIcon" /> <Category ID="ConfigMgr.2012.Client.Library.ConfigMgr.2012.Client.Application.Small.Icon.Category" Target="ConfigMgr.2012.Client.Library.ConfigMgr.2012.Client.Application.Small.Icon" Value="System!System.Internal.ManagementPack.Images.u16x16Icon" /> </Categories> <Presentation> <ImageReferences> <ImageReference ElementID="ConfigMgr.2012.Client.Library.ConfigMgr.2012.Client.Application" ImageID="ConfigMgr.2012.Client.Library.ConfigMgr.2012.Client.Application.Diagram.Icon"/> <ImageReference ElementID="ConfigMgr.2012.Client.Library.ConfigMgr.2012.Client.Application" ImageID="ConfigMgr.2012.Client.Library.ConfigMgr.2012.Client.Application.Small.Icon"/> </ImageReferences> </Presentation> <Resources> <Image ID="ConfigMgr.2012.Client.Library.ConfigMgr.2012.Client.Application.Diagram.Icon" FileName="CMClientx80.png" Accessibility="Public" HasNullStream="false" Comment="ConfigMgr 2012 Client Icon Diagram" /> <Image ID="ConfigMgr.2012.Client.Library.ConfigMgr.2012.Client.Application.Small.Icon" FileName="CMClientx16.png" Accessibility="Public" HasNullStream="false" Comment="ConfigMgr 2012 Client Icon Small" /> </Resources>
So the difference between the OpsMgr MP and the Service Manager MP is that in OpsMgr MP, there’s an additional section
Note: Because the images are added as embedded resources, when importing the MP into OpsMgr, you have to use the Management Pack Bundle (.mpb) file instead of .mp file.
The finishing piece in OpsMgr operational console looks like below:
Leave a comment