formats/adgroup.format.ps1xml

<?xml version="1.0" encoding="UTF-8"?>
<!--
Format type data generated 03/12/2021 17:04:23 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/12/2021 17:04:23 by COMPANY\artd-->
      <Name>group</Name>
      <ViewSelectedBy>
        <TypeName>Microsoft.ActiveDirectory.Management.ADGroup</TypeName>
      </ViewSelectedBy>
      <TableControl>
        <!--Delete the AutoSize node if you want to use the defined widths.-->
        <AutoSize />
        <TableHeaders>
          <TableColumnHeader>
            <Label>Name</Label>
            <Width>20</Width>
            <Alignment>left</Alignment>
          </TableColumnHeader>
          <TableColumnHeader>
            <Label>GroupCategory</Label>
            <Width>16</Width>
            <Alignment>left</Alignment>
          </TableColumnHeader>
          <TableColumnHeader>
            <Label>GroupScope</Label>
            <Width>13</Width>
            <Alignment>left</Alignment>
          </TableColumnHeader>
          <TableColumnHeader>
            <Label>DistinguishedName</Label>
            <Width>38</Width>
            <Alignment>left</Alignment>
          </TableColumnHeader>
        </TableHeaders>
        <TableRowEntries>
          <TableRowEntry>
            <Wrap />
            <TableColumnItems>
              <TableColumnItem>
                <PropertyName>Name</PropertyName>
              </TableColumnItem>
              <TableColumnItem>
                <ScriptBlock>
                if ($host.name -match 'console' -AND $_.GroupCategory -eq 'Distribution') {
                  "$($ADReportingToolsOptions.distributionlist)$($_.GroupCategory)$([char]0x1b)[0m"
                }
                else {
                $_.GroupCategory
                }
                </ScriptBlock>
              </TableColumnItem>
              <TableColumnItem>
                  <ScriptBlock>
                  if ($host.name -match 'console' -AND $_.GroupScope -eq 'Universal') {
                      "$($ADReportingToolsOptions.Universal)$($_.GroupScope)$([char]0x1b)[0m"
                      }
                  elseif ($host.name -match 'console' -AND $_.GroupScope -eq 'DomainLocal') {
                      "$($ADReportingToolsOptions.DomainLocal)$($_.GroupScope)$([char]0x1b)[0m"
                      }
                      else {
                      $_.GroupScope
                      }
                  </ScriptBlock>
              </TableColumnItem>
              <TableColumnItem>
                <PropertyName>DistinguishedName</PropertyName>
              </TableColumnItem>
            </TableColumnItems>
          </TableRowEntry>
        </TableRowEntries>
      </TableControl>
    </View>
  </ViewDefinitions>
</Configuration>