formats/psparameterinfo.format.ps1xml

<?xml version="1.0" encoding="UTF-8"?>
<!--
format type data generated 08/13/2020 16:04:11 by BOVINE320\Jeff
-->
<Configuration>
  <ViewDefinitions>
      <View>
      <!--Created 08/13/2020 16:13:15 by BOVINE320\Jeff-->
      <Name>summary</Name>
      <ViewSelectedBy>
        <TypeName>PSParameterInfo</TypeName>
      </ViewSelectedBy>
      <GroupBy>
        <PropertyName>ParameterSet</PropertyName>
        <Label>ParameterSet</Label>
      </GroupBy>
      <TableControl>
        <!--Delete the AutoSize node if you want to use the defined widths.
        <AutoSize />-->
        <TableHeaders>
          <TableColumnHeader>
            <Label>Name</Label>
            <Width>15</Width>
            <Alignment>left</Alignment>
          </TableColumnHeader>
          <TableColumnHeader>
            <Label>Aliases</Label>
            <Width>15</Width>
            <Alignment>left</Alignment>
          </TableColumnHeader>
          <TableColumnHeader>
            <Label>Mandatory</Label>
            <Width>12</Width>
            <Alignment>left</Alignment>
          </TableColumnHeader>
          <TableColumnHeader>
            <Label>Position</Label>
            <Width>11</Width>
            <Alignment>left</Alignment>
          </TableColumnHeader>
          <TableColumnHeader>
            <Label>Type</Label>
            <Alignment>left</Alignment>
          </TableColumnHeader>
        </TableHeaders>
        <TableRowEntries>
          <TableRowEntry>
            <TableColumnItems>
              <TableColumnItem>
                <PropertyName>Name</PropertyName>
              </TableColumnItem>
              <TableColumnItem>
                <PropertyName>Aliases</PropertyName>
              </TableColumnItem>
              <TableColumnItem>
                <ScriptBlock>
                if ($host.name -match 'console|code|remotehost' -AND $_.mandatory) {
                    "$([char]27)[38;5;219m$($_.mandatory)$([char]27)[0m"
                }
                else {
                  $_.Mandatory
                }
                </ScriptBlock>
              </TableColumnItem>
              <TableColumnItem>
                <PropertyName>Position</PropertyName>
              </TableColumnItem>
              <TableColumnItem>
                <PropertyName>Type</PropertyName>
              </TableColumnItem>
            </TableColumnItems>
          </TableRowEntry>
        </TableRowEntries>
      </TableControl>
    </View>
    <View>
      <!--Created 08/13/2020 16:04:11 by BOVINE320\Jeff-->
      <Name>list</Name>
      <ViewSelectedBy>
        <TypeName>PSParameterInfo</TypeName>
      </ViewSelectedBy>
      <GroupBy>
        <PropertyName>ParameterSet</PropertyName>
        <Label>ParameterSet</Label>
      </GroupBy>
      <ListControl>
        <ListEntries>
          <ListEntry>
            <ListItems>
              <ListItem>
                <Label>Name</Label>
                <PropertyName>Name</PropertyName>
              </ListItem>
              <ListItem>
                <Label>Aliases</Label>
                <PropertyName>Aliases</PropertyName>
              </ListItem>
              <ListItem>
                <Label>Mandatory</Label>
                <ScriptBlock>
                <!--show mandatory in yellow-->
                if ($host.name -match 'console|code|remotehost' -AND $_.mandatory) {
                    "$([char]27)[38;5;219m$($_.mandatory)$([char]27)[0m"
                }
                else {
                  $_.Mandatory
                }
                </ScriptBlock>
              </ListItem>
              <ListItem>
                <Label>IsDynamic</Label>
                <ScriptBlock>
                if ($host.name -match'console|code|remotehost' -AND $_.IsDynamic) {
                    "$([char]27)[38;5;199m$($_.IsDynamic)$([char]27)[0m"
                }
                else {
                  $_.IsDynamic
                }
                </ScriptBlock>
              </ListItem>
              <ListItem>
                <Label>Position</Label>
                <PropertyName>Position</PropertyName>
              </ListItem>
              <ListItem>
                <Label>Type</Label>
                <PropertyName>Type</PropertyName>
              </ListItem>
              <ListItem>
                <Label>ValueFromPipeline</Label>
                <ScriptBlock>
                <!--show in green if true-->
                if ($host.name -match 'console|code|remotehost' -AND $_.ValueFromPipeline) {
                    "$([char]27)[38;5;47m$($_.ValueFromPipeline)$([char]27)[0m"
                }
                else {
                  $_.ValueFromPipeline
                }
                </ScriptBlock>
              </ListItem>
              <ListItem>
                <Label>ValueFromPipelineByPropertyName</Label>
                             <ScriptBlock>
                <!--show in green if true-->
                if ($host.name -match 'console|code|remotehost' -AND $_.ValueFromPipelineByPropertyName) {
                    "$([char]27)[38;5;47m$($_.ValueFromPipelineByPropertyName)$([char]27)[0m"
                }
                else {
                  $_.ValueFromPipelineByPropertyName
                }
                </ScriptBlock>
              </ListItem>
            </ListItems>
          </ListEntry>
        </ListEntries>
      </ListControl>
    </View>

  </ViewDefinitions>
</Configuration>