formats/addchealth.format.ps1xml
<?xml version="1.0" encoding="UTF-8"?>
<!-- Format type data generated 03/02/2021 16:48:05 by COMPANY\artd 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 03/02/2021 16:48:05 by COMPANY\artd--> <Name>default</Name> <ViewSelectedBy> <TypeName>ADDomainControllerHealth</TypeName> </ViewSelectedBy> <GroupBy> <ScriptBlock>"{0} [{1}]" -f $_.Hostname,$_.IPAddress</ScriptBlock> <Label>DC</Label> </GroupBy> <TableControl> <!--Delete the AutoSize node if you want to use the defined widths. <AutoSize />--> <TableHeaders> <TableColumnHeader> <Label>Uptime</Label> <Width>15</Width> <Alignment>left</Alignment> </TableColumnHeader> <TableColumnHeader> <Label>PctFreeC</Label> <Width>10</Width> <Alignment>right</Alignment> </TableColumnHeader> <TableColumnHeader> <Label>PctFreeMem</Label> <Width>12</Width> <Alignment>right</Alignment> </TableColumnHeader> <TableColumnHeader> <Label>PctSecLog</Label> <Width>12</Width> <Alignment>right</Alignment> </TableColumnHeader> <TableColumnHeader> <Label>ServiceAlert</Label> <Width>15</Width> <Alignment>center</Alignment> </TableColumnHeader> </TableHeaders> <TableRowEntries> <TableRowEntry> <TableColumnItems> <TableColumnItem> <ScriptBlock> $u = $_.Uptime.tostring() $i = $u.LastIndexOf(".") $u.Substring(0,$i) </ScriptBlock> </TableColumnItem> <TableColumnItem> <ScriptBlock> if ($host.name -match 'console' -AND $_.PctFreeSpace -le 10) { "$($ADReportingToolsOptions.alert)$($_.PctFreeSpace)$([char]0x1b)[0m" } elseif ($host.name -match 'console' -AND $_.PctFreeSpace -le 30) { "$($ADReportingToolsOptions.warning)$($_.PctFreeSpace)$([char]0x1b)[0m" } else { $_.PctFreeSpace } </ScriptBlock> </TableColumnItem> <TableColumnItem> <ScriptBlock> if ($host.name -match 'console' -AND $_.PctFreeMemory -le 10) { "$($ADReportingToolsOptions.alert)m$($_.PctFreeMemory)$([char]0x1b)[0m" } elseif ($host.name -match 'console' -AND $_.PctFreeMemory -le 30 ) { "$($ADReportingToolsOptions.warning)$($_.PctFreeMemory)$([char]0x1b)[0m" } else { $_.PctFreeMemory } </ScriptBlock> </TableColumnItem> <TableColumnItem> <ScriptBlock> if ($host.name -match 'console' -AND $_.PctSecurityLog -le 15) { "$($ADReportingToolsOptions.alert)$($_.PctSecurityLog)$([char]0x1b)[0m" } elseif ($host.name -match 'console' -AND $_.PctSecurityLog -le 50 ) { "$($ADReportingToolsOptions.warning)$($_.PctSecurityLog)$([char]0x1b)[0m" } else { $_.PctSecurityLog } </ScriptBlock> </TableColumnItem> <TableColumnItem> <ScriptBlock> if ($host.name -match 'console' -AND $_.ServiceAlert) { "$($ADReportingToolsOptions.alert)$($_.ServiceAlert)$([char]0x1b)[0m" } else { $_.ServiceAlert } </ScriptBlock> </TableColumnItem> </TableColumnItems> </TableRowEntry> </TableRowEntries> </TableControl> </View> <View> <!--Created 03/02/2021 17:32:16 by COMPANY\artd--> <Name>info</Name> <ViewSelectedBy> <TypeName>ADDomainControllerHealth</TypeName> </ViewSelectedBy> <GroupBy> <PropertyName>DistinguishedName</PropertyName> <Label>Domain Controller</Label> </GroupBy> <TableControl> <!--Delete the AutoSize node if you want to use the defined widths. <AutoSize />--> <TableHeaders> <TableColumnHeader> <Label>OperatingSystem</Label> <Width>35</Width> <Alignment>left</Alignment> </TableColumnHeader> <TableColumnHeader> <Label>IsGC</Label> <Width>7</Width> <Alignment>left</Alignment> </TableColumnHeader> <TableColumnHeader> <Label>IsRO</Label> <Width>7</Width> <Alignment>left</Alignment> </TableColumnHeader> <TableColumnHeader> <Label>Roles</Label> <Width>50</Width> <Alignment>left</Alignment> </TableColumnHeader> </TableHeaders> <TableRowEntries> <TableRowEntry> <Wrap /> <TableColumnItems> <TableColumnItem> <PropertyName>OperatingSystem</PropertyName> </TableColumnItem> <TableColumnItem> <PropertyName>IsGlobalCatalog</PropertyName> </TableColumnItem> <TableColumnItem> <PropertyName>IsReadOnly</PropertyName> </TableColumnItem> <TableColumnItem> <PropertyName>Roles</PropertyName> </TableColumnItem> </TableColumnItems> </TableRowEntry> </TableRowEntries> </TableControl> </View> <View> <!--Created 03/04/2021 15:29:50 by COMPANY\artd--> <Name>default</Name> <ViewSelectedBy> <TypeName>ADDomainControllerService</TypeName> </ViewSelectedBy> <GroupBy> <PropertyName>Computername</PropertyName> <Label>Computername</Label> </GroupBy> <TableControl> <!--Delete the AutoSize node if you want to use the defined widths.--> <AutoSize /> <TableHeaders> <TableColumnHeader> <Label>ProcessID</Label> <Width>12</Width> <Alignment>left</Alignment> </TableColumnHeader> <TableColumnHeader> <Label>Displayname</Label> <Width>32</Width> <Alignment>left</Alignment> </TableColumnHeader> <TableColumnHeader> <Label>Name</Label> <Width>7</Width> <Alignment>left</Alignment> </TableColumnHeader> <TableColumnHeader> <Label>State</Label> <Width>10</Width> <Alignment>left</Alignment> </TableColumnHeader> <TableColumnHeader> <Label>StartMode</Label> <Width>12</Width> <Alignment>left</Alignment> </TableColumnHeader> <TableColumnHeader> <Label>Started</Label> <Width>10</Width> <Alignment>left</Alignment> </TableColumnHeader> </TableHeaders> <TableRowEntries> <TableRowEntry> <TableColumnItems> <TableColumnItem> <PropertyName>ProcessID</PropertyName> </TableColumnItem> <TableColumnItem> <PropertyName>Displayname</PropertyName> </TableColumnItem> <TableColumnItem> <PropertyName>Name</PropertyName> </TableColumnItem> <TableColumnItem> <PropertyName>State</PropertyName> </TableColumnItem> <TableColumnItem> <PropertyName>StartMode</PropertyName> </TableColumnItem> <TableColumnItem> <PropertyName>Started</PropertyName> </TableColumnItem> </TableColumnItems> </TableRowEntry> </TableRowEntries> </TableControl> </View> </ViewDefinitions> </Configuration> |