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>


mahendar cherry said...

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

Game Hacker said...

Game Hacker is an android app which is very popular that is used to hack or manipulate many popular games.
game hacker download

Eric Luster said...

MsMpEng.exe AntiMalware Service Executable is the core process of Windows Defender’s background process, Learn How to stop it from eating your system resources.
Antimalware Service Executable – High Usage Fix

Seth Rollins said...

Gangstar Vegas is an open world action-adventure video game developed by Gameloft for Android, iOS.

antimalware service executable said...

I found very interesting and nice keep sharing awesome shared
disable antimalware service windows 10

The Fresh Images said...

Don't forget to check out on The Fresh Images.

Sophie Grace said...

I found very interesting and nice keep sharing awesome shared html color picker

kanu said...

amazing post man get url

kanu said...

amazing post man icloud for windows

kanu said...

amazing post man aaron spin rewriter

kanu said...

amazing post man cvs myhr login

badmanlive said...

It's surprising you aren't more popular given that you definitely possess the gift.
kerala lottery today result

kanu said...

Great aptoide apk

kanu said...

Amazing Achieve3000 Login login portal

kanu said...

Great sign in

kanu said...

Amazing free Cloud storage services

kanu said...

nice post....Install Aptoide iOS


thank u for your service intradote

kanu said...

Amazing Post Aptoide for Sony Ericsson

kanu said...

Nice icloud login

kanu said...

Great loginportal

kanu said...

Superb best cloud storage service