format.ps1xml
<?xml version="1.0" encoding="utf-8" ?>
<Configuration> <ViewDefinitions> <View> <Name>extended</Name> <ViewSelectedBy> <TypeName>Microsoft.PowerShell.Commands.HistoryInfo#Extended</TypeName> </ViewSelectedBy> <TableControl> <TableHeaders> <TableColumnHeader> <Width>4</Width> <Alignment>Right</Alignment> </TableColumnHeader> <TableColumnHeader> <Width>30</Width> </TableColumnHeader> <TableColumnHeader> <Label>Duration</Label> <Width>14</Width> </TableColumnHeader> <TableColumnHeader> <Width>7</Width> </TableColumnHeader> <TableColumnHeader> <Label>#Errors</Label> <Width>7</Width> </TableColumnHeader> <TableColumnHeader /> </TableHeaders> <TableRowEntries> <TableRowEntry> <TableColumnItems> <TableColumnItem> <PropertyName>Id</PropertyName> </TableColumnItem> <TableColumnItem> <PropertyName>CommandLine</PropertyName> </TableColumnItem> <TableColumnItem> <ScriptBlock> if ($_.Duration.TotalDays -gt 1) { $_.Duration.ToString('d\.hh\:mm\:ss\.fff') } else { $_.Duration.ToString('hh\:mm\:ss\.fff') } </ScriptBlock> </TableColumnItem> <TableColumnItem> <PropertyName>Success</PropertyName> </TableColumnItem> <TableColumnItem> <ScriptBlock> if ($_.ErrorCount -ne $null) { if ($_.ExecutionStatus -eq [System.Management.Automation.Runspaces.PipelineState]::Failed) { "$($_.ErrorCount) !" } else { $_.ErrorCount } } </ScriptBlock> </TableColumnItem> <TableColumnItem> <PropertyName>Output</PropertyName> </TableColumnItem> </TableColumnItems> </TableRowEntry> </TableRowEntries> </TableControl> </View> </ViewDefinitions> </Configuration> |