formats/pschristmas.format.ps1xml
<!--
Format type data generated 12/02/2024 17:41:14 by PROSPERO\Jeff 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 12/02/2024 17:41:14 by PROSPERO\Jeff--> <Name>default</Name> <ViewSelectedBy> <TypeName>PSChristmas</TypeName> </ViewSelectedBy> <GroupBy> <ScriptBlock>"$([char]27)[3m$($_.Greeting)$([char]27)[0m"</ScriptBlock> <Label>Holiday Message</Label> </GroupBy> <TableControl> <!--Delete the AutoSize node if you want to use the defined widths.--> <AutoSize /> <TableHeaders> <TableColumnHeader> <Label>ElfName</Label> <Width>21</Width> <Alignment>left</Alignment> </TableColumnHeader> <TableColumnHeader> <Label>List</Label> <Width>7</Width> <Alignment>left</Alignment> </TableColumnHeader> <TableColumnHeader> <Label>ChristmasDay</Label> <Width>15</Width> <Alignment>center</Alignment> </TableColumnHeader> <TableColumnHeader> <Label>Days</Label> <Width>5</Width> <Alignment>right</Alignment> </TableColumnHeader> <TableColumnHeader> <Label>CountDown</Label> <Width>14</Width> <Alignment>right</Alignment> </TableColumnHeader> </TableHeaders> <TableRowEntries> <TableRowEntry> <TableColumnItems> <TableColumnItem> <PropertyName>ElfName</PropertyName> </TableColumnItem> <TableColumnItem> <ScriptBlock> if ($_.List -eq 'Naughty') { $i = 199 } else { $i = 48 } "$([char]27)[38;5;$($i)m$($_.List)$([char]27)[0m" </ScriptBlock> </TableColumnItem> <TableColumnItem> <PropertyName>ChristmasDay</PropertyName> </TableColumnItem> <TableColumnItem> <PropertyName>DaysRemaining</PropertyName> </TableColumnItem> <TableColumnItem> <PropertyName>CountDown</PropertyName> </TableColumnItem> </TableColumnItems> </TableRowEntry> </TableRowEntries> </TableControl> </View> </ViewDefinitions> </Configuration> |