Modules/Utility/Pscx.Utility.Format.ps1xml

<?xml version="1.0" encoding="utf-8" ?>
<Configuration>
  <Controls>
    <Control>
      <Name>ParameterGroupingFormat</Name>
      <CustomControl>
        <CustomEntries>
          <CustomEntry>
            <CustomItem>
              <Frame>
                <LeftIndent>4</LeftIndent>
                <CustomItem>
                  <Text>Command: </Text>
                  <ExpressionBinding>
                    <ScriptBlock>"{0}/{1}" -f $(if($_.command.ModuleName){$_.command.ModuleName}else{$_.Command.CommandType.ToString()+":"}),$_.command.Name</ScriptBlock>
                  </ExpressionBinding>
                  <NewLine/>
                  <Text>Set: </Text>
                  <ExpressionBinding>
                    <ScriptBlock>"$(if($_.ParameterSet -eq "__AllParameterSets"){"Default"}else{$_.ParameterSet})" + "$(if($_.ParameterSet.IsDefault){" *"})"</ScriptBlock>
                  </ExpressionBinding>
                  <NewLine/>
                </CustomItem>
              </Frame>
            </CustomItem>
          </CustomEntry>
        </CustomEntries>
      </CustomControl>
    </Control>
  </Controls>
  <ViewDefinitions>
    <View>
      <Name>ParameterMetadataEx</Name>
      <ViewSelectedBy>
        <TypeName>System.Management.Automation.ParameterMetadataEx</TypeName>
      </ViewSelectedBy>
      <GroupBy>
        <PropertyName>ParameterSet</PropertyName>
        <CustomControlName>ParameterGroupingFormat</CustomControlName>
      </GroupBy>
      <TableControl>
        <TableHeaders>
          <TableColumnHeader>
            <Label>Name</Label>
            <Width>22</Width>
          </TableColumnHeader>
          <TableColumnHeader>
            <Label>Aliases</Label>
            <Width>12</Width>
          </TableColumnHeader>
          <TableColumnHeader>
            <Label>Position</Label>
            <Width>8</Width>
          </TableColumnHeader>
          <TableColumnHeader>
            <Label>Mandatory</Label>
            <Width>9</Width>
          </TableColumnHeader>
          <TableColumnHeader>
            <Label>Pipeline</Label>
            <Width>8</Width>
          </TableColumnHeader>
          <TableColumnHeader>
            <Label>ByName</Label>
            <Width>6</Width>
          </TableColumnHeader>
          <TableColumnHeader>
            <Label>Provider</Label>
            <Width>15</Width>
          </TableColumnHeader>
          <TableColumnHeader>
            <Label>Type</Label>
          </TableColumnHeader>
        </TableHeaders>
        <TableRowEntries>
          <TableRowEntry>
            <TableColumnItems>
              <TableColumnItem>
                <PropertyName>Name</PropertyName>
              </TableColumnItem>
              <TableColumnItem>
                <PropertyName>Aliases</PropertyName>
              </TableColumnItem>
              <TableColumnItem>
                <!--PropertyName>Position</PropertyName-->
                <ScriptBlock>if($_.Position -lt 0){"Named"}else{$_.Position}</ScriptBlock>
              </TableColumnItem>
              <TableColumnItem>
                <PropertyName>Mandatory</PropertyName>
              </TableColumnItem>
              <TableColumnItem>
                <PropertyName>ValueFromPipeline</PropertyName>
              </TableColumnItem>
              <TableColumnItem>
                <PropertyName>ValueFromPipelineByPropertyName</PropertyName>
              </TableColumnItem>
              <TableColumnItem>
                <!--PropertyName>Provider</PropertyName-->
                <ScriptBlock>if($_.Provider){$_.Provider}else{"All"}</ScriptBlock>
              </TableColumnItem>
              <TableColumnItem>
                <PropertyName>Type</PropertyName>
              </TableColumnItem>
            </TableColumnItems>
          </TableRowEntry>
        </TableRowEntries>
      </TableControl>
    </View>
    <View>
      <Name>ExecutionTimeInfo</Name>
      <ViewSelectedBy>
        <TypeName>Pscx.Commands.Modules.Utility.ExecutionTimeInfo</TypeName>
      </ViewSelectedBy>
      <TableControl>
        <TableHeaders>
          <TableColumnHeader>
            <Label>Id</Label>
            <Width>4</Width>
            <Alignment>right</Alignment>
          </TableColumnHeader>
          <TableColumnHeader>
            <Label>ExecutionTime</Label>
            <Width>16</Width>
            <Alignment>left</Alignment>
          </TableColumnHeader>
          <TableColumnHeader>
            <Label>HistoryInfo</Label>
            <Alignment>left</Alignment>
          </TableColumnHeader>
        </TableHeaders>
        <TableRowEntries>
          <TableRowEntry>
            <TableColumnItems>
              <TableColumnItem>
                <PropertyName>Id</PropertyName>
              </TableColumnItem>
              <TableColumnItem>
                <PropertyName>ExecutionTime</PropertyName>
              </TableColumnItem>
              <TableColumnItem>
                <PropertyName>HistoryInfo</PropertyName>
              </TableColumnItem>
            </TableColumnItems>
          </TableRowEntry>
        </TableRowEntries>
      </TableControl>
    </View>
  </ViewDefinitions>
</Configuration>