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" />
</TypeProjection>

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">
<ID>Microsoft.Windows.Library</ID>
<Version>7.0.5826.0</Version>
<PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
</Reference>

<Reference Alias="ConfigurationManager">
<ID>Microsoft.SystemCenter.ConfigurationManager</ID>
<Version>7.0.5826.0</Version>
<PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
</Reference>

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>
</DisplayString>

5 comments:

mahendar cherry said...

We use USB device to transfer data into our PC and Laptops
www.windowslibrary.org/

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.
gangstarvegasmodapk.me

antimalware service executable said...

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