DSACL.format.ps1xml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
<?xml version="1.0" encoding="utf-8"?>
<Configuration>
    <ViewDefinitions>
        <View>
            <Name>ActiveDirectoryAccessRule</Name>
            <ViewSelectedBy>
                <TypeName>System.DirectoryServices.ActiveDirectoryAccessRule</TypeName>
            </ViewSelectedBy>
            <TableControl>
                <TableHeaders>
                    <TableColumnHeader>
                        <Label>AccessControlType</Label>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Label>ActiveDirectoryRights</Label>
                        <Width>26</Width>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Label>ObjectType</Label>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Label>InheritedObjectType</Label>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Label>InheritanceType</Label>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Label>IdentityReference</Label>
                        <Width>4</Width>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Label>IsInherited</Label>
                    </TableColumnHeader>
                </TableHeaders>
                <TableRowEntries>
                    <TableRowEntry>
                        <TableColumnItems>
                            <TableColumnItem>
                                <PropertyName>AccessControlType</PropertyName>
                            </TableColumnItem>
                            <TableColumnItem>
                                <ScriptBlock>
                                    $Width = 26
                                    $S = ($_.ActiveDirectoryRights | % ToString) -join ','
                                    $S = $S -replace '(?-i)[a-z\s]'
                                    if ($S.length -gt $Width) {
                                        $S='{0}...'-f $S.SubString(0,$Width-3)
                                    };
                                    return $S;
                                </ScriptBlock>
                            </TableColumnItem>
                            <TableColumnItem>
                                <ScriptBlock>ConvertFrom-DSACLObjectTypeGuid -Access $_</ScriptBlock>
                            </TableColumnItem>
                            <TableColumnItem>
                                <ScriptBlock>ConvertFrom-DSACLInheritedObjectTypeGuid -Access $_</ScriptBlock>
                            </TableColumnItem>
                            <TableColumnItem>
                                <PropertyName>InheritanceType</PropertyName>
                            </TableColumnItem>
                            <TableColumnItem>
                                <PropertyName>IdentityReference</PropertyName>
                            </TableColumnItem>
                            <TableColumnItem>
                                <PropertyName>IsInherited</PropertyName>
                            </TableColumnItem>
                        </TableColumnItems>
                    </TableRowEntry>
                </TableRowEntries>
            </TableControl>
        </View>

        <View>
            <Name>ActiveDirectoryAuditRule</Name>
            <ViewSelectedBy>
                <TypeName>System.DirectoryServices.ActiveDirectoryAuditRule</TypeName>
            </ViewSelectedBy>
            <TableControl>
                <TableHeaders>
                    <TableColumnHeader>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Label>ActiveDirectoryRights</Label>
                        <Width>26</Width>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Label>ObjectType</Label>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Label>InheritedObjectType</Label>
                    </TableColumnHeader>
                    <TableColumnHeader>
                    </TableColumnHeader>
                    <TableColumnHeader>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Label>IsInherited</Label>
                    </TableColumnHeader>
                </TableHeaders>
                <TableRowEntries>
                    <TableRowEntry>
                        <TableColumnItems>
                            <TableColumnItem>
                                <PropertyName>AuditFlags</PropertyName>
                            </TableColumnItem>
                            <TableColumnItem>
                                <ScriptBlock>
                                    $Width = 26
                                    $S = ($_.ActiveDirectoryRights | % ToString) -join ','
                                    $S = $S -replace '(?-i)[a-z\s]'
                                    if ($S.length -gt $Width) {
                                        $S='{0}...'-f $S.SubString(0,$Width-3)
                                    };
                                    return $S;
                                </ScriptBlock>
                            </TableColumnItem>
                            <TableColumnItem>
                                <ScriptBlock>ConvertFrom-DSACLObjectTypeGuid -Audit $_</ScriptBlock>
                            </TableColumnItem>
                            <TableColumnItem>
                                <ScriptBlock>ConvertFrom-DSACLInheritedObjectTypeGuid -Audit $_</ScriptBlock>
                            </TableColumnItem>
                            <TableColumnItem>
                                <PropertyName>InheritanceType</PropertyName>
                            </TableColumnItem>
                            <TableColumnItem>
                                <PropertyName>IdentityReference</PropertyName>
                            </TableColumnItem>
                            <TableColumnItem>
                                <PropertyName>IsInherited</PropertyName>
                            </TableColumnItem>
                        </TableColumnItems>
                    </TableRowEntry>
                </TableRowEntries>
            </TableControl>
        </View>
    </ViewDefinitions>
</Configuration>