sthAdminSDHolder.format.ps1xml

<?xml version="1.0" encoding="utf-8" ?>
<Configuration>
    <SelectionSets>
        <SelectionSet>
            <Name>sth.AdminSDHolderGroups</Name>
            <Types>
                <TypeName>sth.AdminSDHolderGroups</TypeName>
                <TypeName>sth.AdminSDHolderGroups#ExcludedGroups</TypeName>
            </Types>
        </SelectionSet>
    </SelectionSets>
 
    <ViewDefinitions>
        <View>
            <Name>sth.AdminSDHolderProtectedUserAccount</Name>
            <ViewSelectedBy>
                <TypeName>sth.AdminSDHolderProtectedUserAccount</TypeName>
            </ViewSelectedBy>
            <TableControl>
                <TableHeaders>
                    <TableColumnHeader/>
                    <TableColumnHeader/>
                    <TableColumnHeader/>
                    <TableColumnHeader/>
                    <TableColumnHeader/>
                    <TableColumnHeader/>
                    <TableColumnHeader/>
                </TableHeaders>
                <TableRowEntries>
                    <TableRowEntry>
                        <TableColumnItems>
                            <TableColumnItem>
                                <PropertyName>Name</PropertyName>
                            </TableColumnItem>
                            <TableColumnItem>
                                <PropertyName>SamAccountName</PropertyName>
                            </TableColumnItem>
                            <TableColumnItem>
                                <PropertyName>UserPrincipalName</PropertyName>
                            </TableColumnItem>
                            <TableColumnItem>
                                <PropertyName>Enabled</PropertyName>
                            </TableColumnItem>
                            <TableColumnItem>
                                <PropertyName>AdminCountAttribute</PropertyName>
                            </TableColumnItem>
                            <TableColumnItem>
                                <PropertyName>InheritanceEnabled</PropertyName>
                            </TableColumnItem>
                            <TableColumnItem>
                                <PropertyName>AdminSDHolderGroups</PropertyName>
                            </TableColumnItem>
                        </TableColumnItems>
                    </TableRowEntry>
                </TableRowEntries>
            </TableControl>
        </View>
 
        <View>
            <Name>sth.AdminSDHolderGroups</Name>
            <ViewSelectedBy>
                <SelectionSetName>sth.AdminSDHolderGroups</SelectionSetName>
            </ViewSelectedBy>
            <Controls>
                <Control>
                    <Name>dsHeuristics</Name>
                    <CustomControl>
                        <CustomEntries>
                            <CustomEntry>
                                <CustomItem>
                                    <Frame>
                                        <LeftIndent>4</LeftIndent>
                                        <CustomItem>
                                            <Text>dsHeuristics: </Text>
                                            <ExpressionBinding>
                                                <PropertyName>dsHeuristics</PropertyName>
                                            </ExpressionBinding>
                                            <NewLine/>
                                            <NewLine/>
                                        </CustomItem>
                                    </Frame>
                                </CustomItem>
                            </CustomEntry>
                        </CustomEntries>
                    </CustomControl>
                </Control>
                <Control>
                    <Name>ProtectedGroups</Name>
                    <CustomControl>
                        <CustomEntries>
                            <CustomEntry>
                                <CustomItem>
                                    <Frame>
                                        <LeftIndent>4</LeftIndent>
                                        <CustomItem>
                                            <Text>Protected Groups: </Text>
                                            <NewLine/>
                                        </CustomItem>
                                    </Frame>
                                    <ExpressionBinding>
                                        <ScriptBlock>
                                            $script:PGFT = $_.ProtectedGroups | Format-Table
                                            $PGFT | Out-String
                                        </ScriptBlock>
                                    </ExpressionBinding>
                                    <NewLine/>
                                </CustomItem>
                            </CustomEntry>
                        </CustomEntries>
                    </CustomControl>
                </Control>
                <Control>
                    <Name>ExcludedGroups</Name>
                    <CustomControl>
                        <CustomEntries>
                            <CustomEntry>
                                <CustomItem>
                                    <Frame>
                                        <LeftIndent>4</LeftIndent>
                                        <CustomItem>
                                            <Text>Excluded Groups:</Text>
                                            <NewLine/>
                                        </CustomItem>
                                    </Frame>
                                    <ExpressionBinding>
                                        <ScriptBlock>
                                            $EGFT = $_.ExcludedGroups | Format-Table
                                             
                                            for ($i = 0; $i -le 1; $i++)
                                            {
                                                $maximum = 2..$($PGFT.count - 3) | Foreach-Object {$PGFT[$_].formatEntryInfo.formatPropertyFieldList[$i].propertyValue.length} | Measure-Object -Maximum | Select-Object -ExpandProperty Maximum
                                                $EGFT[0].shapeInfo.tableColumnInfoList[$i].width = $maximum
                                            }
 
                                            $EGFT | Out-String
                                        </ScriptBlock>
                                    </ExpressionBinding>
                                    <NewLine/>
                                </CustomItem>
                            </CustomEntry>
                        </CustomEntries>
                    </CustomControl>
                </Control>
                <Control>
                    <Name>NonExistentGroups</Name>
                    <CustomControl>
                        <CustomEntries>
                            <CustomEntry>
                                <CustomItem>
                                    <Frame>
                                        <LeftIndent>4</LeftIndent>
                                        <CustomItem>
                                            <Text>NonExistent Groups</Text>
                                            <NewLine/>
                                        </CustomItem>
                                    </Frame>
                                    <ExpressionBinding>
                                        <ScriptBlock>$_.NonExistentGroups | Format-Table | Out-String</ScriptBlock>
                                    </ExpressionBinding>
                                    <NewLine/>
                                </CustomItem>
                            </CustomEntry>
                        </CustomEntries>
                    </CustomControl>
                </Control>
            </Controls>
            <CustomControl>
                <CustomEntries>
                    <CustomEntry>
                        <CustomItem>
                            <ExpressionBinding>
                                <CustomControlName>dsHeuristics</CustomControlName>
                            </ExpressionBinding>
                            <ExpressionBinding>
                                <ItemSelectionCondition>
                                    <PropertyName>ProtectedGroups</PropertyName>
                                </ItemSelectionCondition>
                                <CustomControlName>ProtectedGroups</CustomControlName>
                            </ExpressionBinding>
                        </CustomItem>
                    </CustomEntry>
                    <CustomEntry>
                        <EntrySelectedBy>
                            <TypeName>sth.AdminSDHolderGroups#ExcludedGroups</TypeName>
                        </EntrySelectedBy>
                        <CustomItem>
                            <ExpressionBinding>
                                <CustomControlName>dsHeuristics</CustomControlName>
                            </ExpressionBinding>
                            <ExpressionBinding>
                                <ItemSelectionCondition>
                                    <PropertyName>ProtectedGroups</PropertyName>
                                </ItemSelectionCondition>
                                <CustomControlName>ProtectedGroups</CustomControlName>
                            </ExpressionBinding>
                            <ExpressionBinding>
                                <ItemSelectionCondition>
                                    <PropertyName>ExcludedGroups</PropertyName>
                                </ItemSelectionCondition>
                                <CustomControlName>ExcludedGroups</CustomControlName>
                            </ExpressionBinding>
                        </CustomItem>
                    </CustomEntry>
                </CustomEntries>
            </CustomControl>
        </View>
    </ViewDefinitions>
</Configuration>