formats/adgroupuser.format.ps1xml

<?xml version="1.0" encoding="UTF-8"?>
<!--
Format type data generated 02/24/2021 12:29:52 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 02/24/2021 12:29:52 by COMPANY\artd-->
      <Name>default</Name>
      <ViewSelectedBy>
        <TypeName>ADGroupUser</TypeName>
      </ViewSelectedBy>
      <GroupBy>
        <ScriptBlock>
        if ($host.name -match 'console' -AND (-not $_.Enabled)) {
          <!-- show disabled accounts in red-->
          $dn = "$($ADReportingToolsOptions.alert)$($_.DistinguishedName)$([char]0x1b)[0m"
          $name = "$($ADReportingToolsOptions.alert)$($_.DisplayName)$([char]0x1b)[0m"
        }
        else {
          $dn = $_.DistinguishedName
          $name = $_.displayname
        }
        "{0} [{1}]" -f $dn,$name
        </ScriptBlock>
        <Label>DistinguishedName</Label>
      </GroupBy>
      <TableControl>
        <!--Delete the AutoSize node if you want to use the defined widths.
        <AutoSize />-->
        <TableHeaders>
          <TableColumnHeader>
            <Label>Name</Label>
            <Width>15</Width>
            <Alignment>left</Alignment>
          </TableColumnHeader>
          <TableColumnHeader>
            <Label>Title</Label>
            <Width>26</Width>
            <Alignment>left</Alignment>
          </TableColumnHeader>
          <TableColumnHeader>
            <Label>Description</Label>
            <Width>35</Width>
            <Alignment>left</Alignment>
          </TableColumnHeader>
          <TableColumnHeader>
            <Label>PasswordLastSet</Label>
            <Width>23</Width>
            <Alignment>right</Alignment>
          </TableColumnHeader>
        </TableHeaders>
        <TableRowEntries>
          <TableRowEntry>
            <Wrap />
            <TableColumnItems>
              <TableColumnItem>
                <PropertyName>Name</PropertyName>
              </TableColumnItem>
              <TableColumnItem>
                <PropertyName>Title</PropertyName>
              </TableColumnItem>
              <TableColumnItem>
                <PropertyName>Description</PropertyName>
              </TableColumnItem>
              <TableColumnItem>
                <PropertyName>PasswordLastSet</PropertyName>
              </TableColumnItem>
            </TableColumnItems>
          </TableRowEntry>
        </TableRowEntries>
      </TableControl>
    </View>
    <View>
      <!--Created 03/02/2021 14:49:14 by COMPANY\artd-->
      <Name>default</Name>
      <ViewSelectedBy>
        <TypeName>ADGroupUser</TypeName>
      </ViewSelectedBy>
      <GroupBy>
        <PropertyName>Group</PropertyName>
        <Label>Group</Label>
      </GroupBy>
      <ListControl>
        <ListEntries>
          <ListEntry>
            <ListItems>
              <ListItem>
                <Label>DistinguishedName</Label>
                <PropertyName>DistinguishedName</PropertyName>
              </ListItem>
              <ListItem>
                <Label>Name</Label>
                <PropertyName>Name</PropertyName>
              </ListItem>
              <ListItem>
                <Label>Displayname</Label>
                <PropertyName>Displayname</PropertyName>
              </ListItem>
              <ListItem>
                <Label>Description</Label>
                <PropertyName>Description</PropertyName>
              </ListItem>
              <ListItem>
                <Label>Title</Label>
                <PropertyName>Title</PropertyName>
              </ListItem>
              <ListItem>
                <Label>Department</Label>
                <PropertyName>Department</PropertyName>
              </ListItem>
              <ListItem>
                <Label>Enabled</Label>
                <PropertyName>Enabled</PropertyName>
              </ListItem>
              <ListItem>
                <Label>PasswordLastSet</Label>
                <PropertyName>PasswordLastSet</PropertyName>
              </ListItem>
            </ListItems>
          </ListEntry>
        </ListEntries>
      </ListControl>
    </View>
  </ViewDefinitions>
</Configuration>