Monday 6 December 2010

Type projections, views and unsealed MP's

I was in the process of creating a view to show all Computers, basically a replica of the view under Configuration Items, but within my own management pack.

However, when I went to use the Computer (typical) type project for my view I got this error message:

This happens because the type projection for Computer (typical) is stored in the unsealed MP ServiceManager.ConfigurationManagement.Configuration.xml
This then means that trying to reference this type projection for views in your own MP is impossible without a bit of tweaking.

It's a fairly easy workaround though, simply recreate the type projection in your own MP.
the XML you will need is:

<TypeProjection ID="AllComputers.View.ProjectionType" Accessibility="Public" Type="Windows!Microsoft.Windows.Computer">
<Component Path="$Context/Path[Relationship='ConfigurationManager!Microsoft.SystemCenter.ConfigurationManager.DeployedComputerRunsWindowsComputer' SeedRole='Target']$" Alias="PhysicalComputer" />
<Component Path="$Context/Path[Relationship='Windows!Microsoft.Windows.ComputerHostsOperatingSystem']$" Alias="OperatingSystem" />

You'll need to make sure you've got some references in as well, either use these, or if you've already got them referenced, change the code above to match your reference:

<Reference Alias="Windows">

<Reference Alias="ConfigurationManager">

Finally, add a display string and make sure you change the name so that it differs from the built in type projection "Computers (typical)".

<DisplayString ElementID="AllComputers.View.ProjectionType">
<Name>Computer (typical - for custom views)</Name>
<Description>Defines the properties of computers typically used in views</Description>


srikanth said...

We use USB device to transfer data into our PC and Laptops

harrymosan said...

QuickBooks is an accounting software by which you can easily maintain your accounts and handle your transactions. if you face any kind of problem then you can try our Quickbooks Support

similarly, if you did not install any antivirus in your system then tried Mcafee Security it detects viruses and unwanted files from the system

McAfee Cloud said...

Hi, the post which you have provided is fantastic, I really enjoyed reading your post, and hope to read more. Thank you so much for sharing this post, I appreciate your work.

To enjoy our services more visit