formats/SDCEOLProductReleaseInfo.format.ps1xml

<!--
Format type data generated 07/23/2025 18:44:11 by siale
 
This file was created using the New-PSFormatXML command that is part
of the PSScriptTools module.
 
https://github.com/jdhitsolutions/PSScriptTools
-->
<Configuration>
  <ViewDefinitions>
    <View>
      <!--Created 07/23/2025 18:44:11 by siale-->
      <Name>default</Name>
      <ViewSelectedBy>
        <TypeName>SupportDeathClock.EOLProductReleaseInfo</TypeName>
      </ViewSelectedBy>
      <GroupBy>
        <PropertyName>ProductLabel</PropertyName>
        <Label>Product</Label>
      </GroupBy>
      <TableControl>
        <!--Delete the AutoSize node if you want to use the defined widths.-->
        <AutoSize />
        <TableHeaders>
          <TableColumnHeader>
            <Label>Version</Label>
            <Width>7</Width>
            <Alignment>left</Alignment>
          </TableColumnHeader>
          <TableColumnHeader>
            <Label>ReleaseDate</Label>
            <Width>14</Width>
            <Alignment>left</Alignment>
          </TableColumnHeader>
          <TableColumnHeader>
            <Label>eolFrom</Label>
            <Width>13</Width>
            <Alignment>left</Alignment>
          </TableColumnHeader>
          <TableColumnHeader>
            <Label>isMaintained</Label>
            <Width>15</Width>
            <Alignment>left</Alignment>
          </TableColumnHeader>
          <TableColumnHeader>
            <Label>latestVersion</Label>
            <Width>13</Width>
            <Alignment>left</Alignment>
          </TableColumnHeader>
          <TableColumnHeader>
            <Label>latestReleaseDate</Label>
            <Width>13</Width>
            <Alignment>left</Alignment>
          </TableColumnHeader>
          <TableColumnHeader>
            <Label>latestLink</Label>
            <Width>56</Width>
            <Alignment>left</Alignment>
          </TableColumnHeader>
        </TableHeaders>
        <TableRowEntries>
          <TableRowEntry>
            <TableColumnItems>
              <!--
            By default the entries use property names, but you can replace them with script blocks.
            <ScriptBlock>$_.foo /1mb -as [int]</ScriptBlock>
-->
              <TableColumnItem>
                <ScriptBlock>
                if($_.isEol -eq $true){
                  $Style = $PSStyle.Foreground.Red
                } else {
                  $Style = $PSStyle.Foreground.Green
                }
                "$Style$($_.Name)$($PSStyle.Reset)"
                </ScriptBlock>
              </TableColumnItem>
              <TableColumnItem>
                <PropertyName>ReleaseDate</PropertyName>
              </TableColumnItem>
              <TableColumnItem>
                <ScriptBlock>
                $daysUntilEol = ([DateTime]$_.eolFrom - (Get-Date)).days
                $Style = $PSStyle.Foreground.Green
                if($daysUntilEol -le 60){
                  $Style = $PSStyle.Foreground.Red
                }
                elseif($daysUntilEol -le 180){
                  $Style = $PSStyle.Foreground.Yellow
                }
                "$Style$($_.eolFrom)$($PSStyle.Reset)"
                </ScriptBlock>
              </TableColumnItem>
              <TableColumnItem>
                <ScriptBlock>
                if($_.isMaintained -eq $true){
                  $Style = $PSStyle.Foreground.Green
                } else {
                  $Style = $PSStyle.Foreground.Red
                }
                "$Style$($_.isMaintained)$($PSStyle.Reset)"
                </ScriptBlock>
              </TableColumnItem>
              <TableColumnItem>
                <PropertyName>latestName</PropertyName>
              </TableColumnItem>
              <TableColumnItem>
                <PropertyName>latestDate</PropertyName>
              </TableColumnItem>
              <TableColumnItem>
                <PropertyName>latestLink</PropertyName>
              </TableColumnItem>
            </TableColumnItems>
          </TableRowEntry>
        </TableRowEntries>
      </TableControl>
    </View>
  </ViewDefinitions>
</Configuration>