Finding out what determines which properties are displayed

MoW, a Monad newsgroup regular, asked why only the Caption, Name and PeakUsage properties were displayed from the command “get-WMIObject Win32_PageFileUsage” while the output object had a lot more properties. I think it is worth it to explain in details how to find out which properties are displayed.
First, I would look at which view defined in one of the *.format.msh1xml files is used. The Trace-Command Cmdlet can help here:
Trace-Command –option All –Name FormatViewBinding { get-WMIObject Win32_PageFileUsage | out-host} –MshHost

The trace output is in yellow. It reads at the end: “DEBUG: FormatViewBindin Information: 0 : No applicable view has been found.” Now, I know that no view is used. The next place to look is the types.msh1xml file. In this file, each type description can have a node called DefaultDisplayPropertySet where the default display properties are defined. Since the class in question is Win32_PageFileUsage, we can search for the string in notepad. Here is the section for the class.


Under the DefaultDisplayPropertySet node, there are Caption, Name, and PeakUsage. The question is answered.

– Kevin[MSFT]

Comments (4)

  1. //o// says:

    as I wanted a list of defined defaults, I came to this one-liner :

    ([xml](gc $MSHHOMEtypes.mshxml)).types.type | foreach {"`n$($‘#’)[1])`n";$_.members.memberset.members.PropertySet.ReferencedProperties | foreach {$}}

    it will display the wmi classes where defaults are defined, and wich properties are selected.

    there is a bit of garbage at the begin and end of the file I think it’s a handy list.

    Greetings //o//

  2. applepwc says:

    why not the win32_processor?

    He had a DefaultDisplayPropertySet.But not show only about it.


    study mow:

    ([xml](gc $MSHHOMEtypes.mshxml)).types.type | where-object {$"System.Management.ManagementObjec") } | select-object @{expression = {$‘#’)[1].split(”)[2]};name="name"}, @{e={$_.members.memberset.members.propertyset.referencedproperties | foreach { $}};name="properties"}

  3. Mark says:


  4. MSDN Archive says:

    In out most recent build, trace-expression is renamed to trace-command.


Skip to main content