Skip to content

Commit 207bf69

Browse files
Update examples
1 parent ea9b9e4 commit 207bf69

11 files changed

+33536
-3211
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Import-Module .\PSWinDocumentation.AD.psd1 -Force
2+
3+
$Forest = Get-WinADForestInformation -Verbose -PasswordQuality -DontRemoveEmpty -Parallel -Splitter "`r`n"
4+
$Forest
Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
Import-Module .\PSWinDocumentation.AD.psd1 -Force
22

33
# Using built-in password list (just one password P@ssw0rd!)
4-
$Passwords = Invoke-ADPasswordAnalysis
5-
$Passwords.'ad.evotec.xyz'.DomainPasswordDuplicatePasswordGroups | Format-Table -AutoSize 'Duplicate Group', *
6-
$Passwords.'ad.evotec.xyz' | Format-Table *
4+
$Passwords = Invoke-ADPasswordAnalysis -Verbose
75

8-
return
9-
# Using a list of passwords
10-
$PathToPasswords = 'C:\Support\GitHub\PSWinDocumentation.AD\Ignore\Passwords.txt'
11-
$Passwords = Invoke-ADPasswordAnalysis -PathToPasswords $PathToPasswords
12-
$Passwords.'ad.evotec.xyz' | Format-Table
13-
14-
return
15-
# Using Hashes from IHaveBeenPwned
16-
$PathToPasswordsHashes = 'C:\Users\przemyslaw.klys\Downloads\pwned-passwords-ntlm-ordered-by-hash-v6\pwned-passwords-ntlm-ordered-by-hash-v6.txt'
17-
$Passwords = Invoke-ADPasswordAnalysis -PathToPasswords $PathToPasswordsHashes -UseNTLMHashes
18-
$Passwords.'ad.evotec.xyz' | Format-Table
6+
# Autogenerated HTML, without prettifying
7+
New-HTML {
8+
foreach ($Domain in $Passwords.Keys) {
9+
New-HTMLTab -Name "Domain $Domain" {
10+
foreach ($Key in $Passwords.$Domain.Keys) {
11+
New-HTMLTab -Name "$Key" {
12+
New-HTMLTable -DataTable $Passwords.$Domain[$Key]
13+
}
14+
}
15+
}
16+
}
17+
} -Online -FilePath $Env:USERPROFILE\Desktop\Passwords.html -ShowHTML
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Import-Module .\PSWinDocumentation.AD.psd1 -Force
2+
3+
# Using built-in password list (just one password P@ssw0rd!)
4+
$Passwords = Invoke-ADPasswordAnalysis
5+
$Passwords.'ad.evotec.xyz'.DomainPasswordDuplicatePasswordGroups | Format-Table -AutoSize 'Duplicate Group', *
6+
7+
New-HTML {
8+
New-HTMLTable -DataTable $Passwords.'ad.evotec.xyz'.DomainPasswordDuplicatePasswordGroups -PriorityProperties 'Duplicate Group'
9+
} -Online -FilePath $Env:USERPROFILE\Desktop\Passwords.html -ShowHTML
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Import-Module .\PSWinDocumentation.AD.psd1 -Force
2+
3+
# Using Hashes from IHaveBeenPwned
4+
$PathToPasswordsHashes = 'C:\Users\przemyslaw.klys\Downloads\pwned-passwords-ntlm-ordered-by-hash-v6\pwned-passwords-ntlm-ordered-by-hash-v6.txt'
5+
$Passwords = Invoke-ADPasswordAnalysis -PathToPasswords $PathToPasswordsHashes -UseNTLMHashes
6+
$Passwords.'ad.evotec.xyz' | Format-Table
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Import-Module .\PSWinDocumentation.AD.psd1 -Force
2+
3+
# Using a list of passwords
4+
$PathToPasswords = 'C:\Support\GitHub\PSWinDocumentation.AD\Ignore\Passwords.txt'
5+
$Passwords = Invoke-ADPasswordAnalysis -PathToPasswords $PathToPasswords
6+
$Passwords.'ad.evotec.xyz' | Format-Table
Lines changed: 191 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,191 @@
1+
Import-Module PSWriteHTML -Force
2+
Import-Module PSWinDocumentation.AD -Force
3+
Import-Module PSWinReportingV2
4+
5+
if ($null -eq $DataSetForest) {
6+
$DataSetForest = Get-WinADForestInformation
7+
}
8+
9+
if ($null -eq $DataSetEvents) {
10+
$DataSetEvents = Find-Events -Report ADUserChangesDetailed, ADUserChanges, ADUserLockouts, ADUserStatus, ADGroupChanges -Servers 'AD1', 'AD2' -DatesRange Last7days -Quiet
11+
}
12+
13+
if ($null -eq $DataBitlockerLapsSummary) {
14+
$DataBitlockerLapsSummary = Get-WinADBitlockerLapsSummary
15+
$Encrypted = $DataBitlockerLapsSummary.Where( { $_.Encrypted -eq $true }, 'split')
16+
$Systems = $DataBitlockerLapsSummary | Group-Object -Property System
17+
}
18+
19+
Dashboard -Name 'Dashimo Test' -FilePath $PSScriptRoot\Output\DashboardActiveDirectoryAdvanced.html -ShowHTML {
20+
SectionOption -BorderRadius 0px -RemoveShadow -HeaderBackGroundColor DarkGray
21+
TabOption -BorderRadius 0px -BackgroundColorActive DarkGray
22+
TableOption -DataStore JavaScript -ArrayJoin -ArrayJoinString ', '
23+
Tab -Name 'Forest' {
24+
Section -Name 'Forest Information' -Invisible {
25+
Section -Name 'Forest Information' {
26+
Table -HideFooter -DataTable $DataSetForest.ForestInformation
27+
}
28+
Section -Name 'FSMO Roles' {
29+
Table -HideFooter -DataTable $DataSetForest.ForestFSMO
30+
}
31+
32+
}
33+
Section -Name 'Forest Domain Controllers' -Collapsable {
34+
Panel {
35+
Table -HideFooter -DataTable $DataSetForest.ForestDomainControllers
36+
}
37+
}
38+
Section -Name 'Forest Optional Features / UPN Suffixes / SPN Suffixes' -Collapsable {
39+
40+
Panel {
41+
Table -HideFooter -DataTable $DataSetForest.ForestOptionalFeatures
42+
}
43+
Panel {
44+
Table -HideFooter -DataTable $DataSetForest.ForestUPNSuffixes
45+
}
46+
Panel {
47+
Table -HideFooter -DataTable $DataSetForest.ForestSPNSuffixes
48+
}
49+
}
50+
Section -Name 'Sites / Subnets / SiteLinks' -Collapsable {
51+
Panel {
52+
Table -HideFooter -DataTable $DataSetForest.ForestSites
53+
}
54+
Panel {
55+
Table -HideFooter -DataTable $DataSetForest.ForestSubnets
56+
}
57+
Panel {
58+
Table -HideFooter -DataTable $DataSetForest.ForestSiteLinks
59+
}
60+
}
61+
}
62+
63+
foreach ($Domain in $DataSetForest.FoundDomains.Keys) {
64+
Tab -Name $Domain {
65+
Tab -Name 'Overview' {
66+
Section -Name 'Domain Controllers / FSMO Roles' {
67+
Panel {
68+
Table -HideFooter -DataTable $DataSetForest.FoundDomains.$Domain.DomainControllers
69+
}
70+
Panel {
71+
Table -HideFooter -DataTable $DataSetForest.FoundDomains.$Domain.DomainFSMO
72+
}
73+
}
74+
Section -Name 'Password Policies' -Invisible {
75+
Section -Name 'Default Password Policy' {
76+
Table -HideFooter -DataTable $DataSetForest.FoundDomains.$Domain.DomainDefaultPasswordPolicy
77+
}
78+
79+
Section -Name 'Domain Fine Grained Policies' {
80+
Table -HideFooter -DataTable $DataSetForest.FoundDomains.$Domain.DomainFineGrainedPolicies
81+
}
82+
}
83+
Section -Name 'Domain Well Known Folders' -Invisible {
84+
Table -HideFooter -DataTable $DataSetForest.FoundDomains.$Domain.DomainWellKnownFolders
85+
}
86+
}
87+
Tab -Name 'Organizational Units' {
88+
Section -Name 'Organizational Units' {
89+
Table -HideFooter -DataTable $DataSetForest.FoundDomains.$Domain.DomainOrganizationalUnits
90+
}
91+
Section -Name 'OU ACL Basic' {
92+
Panel {
93+
Table -HideFooter -DataTable $DataSetForest.FoundDomains.$Domain.DomainOrganizationalUnitsBasicACL
94+
}
95+
}
96+
Section -Name 'OU ACL Extended' {
97+
Panel {
98+
Table -HideFooter -DataTable $DataSetForest.FoundDomains.$Domain.DomainOrganizationalUnitsExtended
99+
}
100+
}
101+
}
102+
Tab -Name 'Users' {
103+
Section -Name 'Users' {
104+
Panel {
105+
Table -HideFooter -DataTable $DataSetForest.FoundDomains.$Domain.DomainUsers
106+
}
107+
}
108+
}
109+
Tab -Name 'Computers' {
110+
Section -Name 'Computers' {
111+
Panel {
112+
Table -HideFooter -DataTable $DataSetForest.FoundDomains.$Domain.DomainComputers
113+
}
114+
}
115+
Section -Name 'Summary Bitlocker & Laps' {
116+
Container {
117+
Section -Invisible {
118+
Panel {
119+
Table -DataTable $DataBitlockerLapsSummary -Filtering
120+
}
121+
}
122+
Section -Invisible {
123+
Panel {
124+
Chart {
125+
foreach ($_ in $Systems) {
126+
ChartPie -Name $_.Name -Value $_.Count
127+
}
128+
}
129+
}
130+
Panel {
131+
Chart {
132+
ChartPie -Name 'Encrypted' -Value $Encrypted[0].Count
133+
ChartPie -Name 'Not Encrypted' -Value $Encrypted[1].Count
134+
}
135+
}
136+
}
137+
}
138+
}
139+
Section -Name 'Bitlocker' {
140+
Panel {
141+
Table -HideFooter -DataTable $DataSetForest.FoundDomains.$Domain.DomainBitlocker
142+
}
143+
}
144+
Section -Name 'LAPS' {
145+
Panel {
146+
Table -HideFooter -DataTable $DataSetForest.FoundDomains.$Domain.DomainLAPS
147+
}
148+
}
149+
}
150+
Tab -Name 'Groups' {
151+
Section -Name 'Groups Priviliged' {
152+
Panel {
153+
Table -HideFooter -DataTable $DataSetForest.FoundDomains.$Domain.DomainGroupsPriviliged
154+
}
155+
Panel {
156+
#Chart -DataTable $DataSetForest.FoundDomains.'ad.evotec.xyz'.DomainGroupsPriviliged -DataNames 'Group Name' -DataCategories $DataSetForest.FoundDomains.'ad.evotec.xyz'.DomainGroupsPriviliged.'Members Count' -DataValues 'Members Count'
157+
}
158+
}
159+
}
160+
Tab -Name 'Group Policies' {
161+
Section -Name 'Group Policies' {
162+
Panel {
163+
Table -HideFooter -DataTable $DataSetForest.FoundDomains.$Domain.DomainGroupPolicies
164+
}
165+
Panel {
166+
Table -HideFooter -DataTable $DataSetForest.FoundDomains.$Domain.DomainGroupPoliciesDetails
167+
}
168+
}
169+
Section -Name 'Owners' {
170+
Panel {
171+
Table -HideFooter -DataTable $DataSetForest.FoundDomains.$Domain.DomainGroupPoliciesOwners
172+
}
173+
174+
}
175+
Section -Name 'Sysvol' {
176+
Panel {
177+
Table -HideFooter -DataTable $DataSetForest.FoundDomains.$Domain.DomainGroupPoliciesSysVol
178+
}
179+
}
180+
Section -Name 'ACL' {
181+
Panel {
182+
Table -HideFooter -DataTable $DataSetForest.FoundDomains.$Domain.DomainGroupPoliciesACL
183+
}
184+
Panel {
185+
Table -HideFooter -DataTable $DataSetForest.FoundDomains.$Domain.DomainGroupPoliciesACLConsistency
186+
}
187+
}
188+
}
189+
}
190+
}
191+
}

0 commit comments

Comments
 (0)