Search notes:

Format for ps1xml files that specifies extended type data in PowerShell

<?xml version="1.0" encoding="utf-8" ?>
<Types>

   <Type><Name> Some.Type.Name </Name>   <!-- The Name tag specifies a .NET Framework type for which the extended types are specified -->

      <Members>                          <!-- One Member tag per type -->

         <AliasProperty><Name> aliasName </Name>

             <ReferencedMemberName>Length</ReferencedMemberName>

         </AliasProperty>

         <ScriptProperty><Name> propertName </Name>
             <GetScriptBlock>

                PowerShell expression (use $this to reference the actual object)

             </GetScriptBlock>
         </ScriptProperty>


         <CodeProperty><Name> … </Name> <!-- Reference a static method of a .NET class -->
            <GetCodeReference>

                <TypeName>   Returned.Typed.Name </TypeName>
                <MethodName> Mode                </MethodName>

            </GetCodeReference>

         </CodeProperty>

    <!-- 
         MemberSet
           defines the default views of the .NET Framework objects  

         The Name is always PSStandardMembers

    -->

         <MemberSet>

            <Name>PSStandardMembers</Name>

            <Members>

              <PropertySet>

    <!--
                The name of the PropertySet is one of
                   o DefaultDisplayProperty
                   o DefaultDisplayPropertySet
                   o DefaultKeyPropertySet

    -->

                  <Name> DefaultDisplayPropertySet </Name>

                  <ReferencedProperties>

                    <Name> Status      </Name>
                    <Name> Name        </Name>
                    <Name> DisplayName </Name>

                  </ReferencedProperties>

              </PropertySet>

            </Members>

         </MemberSet>

      </Members>

   </Type>

</Types>

See also

*.format.ps1xml
Powershell command noun: typeData

Index