Skip to content

Commit 1da781d

Browse files
authored
Merge pull request #206 from AsBuiltReport/dev
v0.9.5 public release
2 parents aacc79d + 7377045 commit 1da781d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+786
-611
lines changed

AsBuiltReport.Microsoft.AD.Style.ps1

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

AsBuiltReport.Microsoft.AD.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"ShowTableCaptions": true
1010
},
1111
"Options": {
12+
"ShowExecutionTime": false,
1213
"ShowDefinitionInfo": false,
1314
"PSDefaultAuthentication": "Negotiate",
1415
"Exclude": {

AsBuiltReport.Microsoft.AD.psd1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
RootModule = 'AsBuiltReport.Microsoft.AD.psm1'
1313

1414
# Version number of this module.
15-
ModuleVersion = '0.9.4'
15+
ModuleVersion = '0.9.5'
1616

1717
# Supported PSEditions
1818
# CompatiblePSEditions = @()
@@ -66,11 +66,11 @@
6666
},
6767
@{
6868
ModuleName = 'Diagrammer.Microsoft.AD';
69-
ModuleVersion = '0.2.14'
69+
ModuleVersion = '0.2.15'
7070
},
7171
@{
7272
ModuleName = 'Diagrammer.Core';
73-
ModuleVersion = '0.2.24'
73+
ModuleVersion = '0.2.26'
7474
}
7575

7676
)

CHANGELOG.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,51 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
##### This project is community maintained and has no sponsorship from Microsoft, its employees or any of its affiliates.
99

10+
## [0.9.5] - 2025-05-10
11+
12+
### Added
13+
14+
- Add Show-AbrDebugExecutionTime function to track execution time of operations
15+
16+
### Changed
17+
18+
- Update PSScriptAnalyzer settings for enhanced code quality checks.
19+
- Bump module version to `0.9.5`.
20+
- Upgrade Diagrammer.Core module to version `0.2.26`.
21+
- Upgrade Diagrammer.Microsoft.AD module to version `0.2.15`.
22+
- Refactor the `Get-AbrDiagrammer` function to improve error handling.
23+
- Change watermark color from `DarkGreen` to `#565656` for better visibility.
24+
- Modified calls to Write-PScriboMessage to include the `-Message` parameter for clarity and consistency across scripts.
25+
- Ensured that warning messages are properly formatted with the `-IsWarning` flag where applicable.
26+
- Enhanced logging messages to provide better context during execution, particularly in sections related to Active Directory, DHCP, DNS, and replication.
27+
- Added Show-AbrDebugExecutionTime function to track execution time for various AD reporting scripts.
28+
- Integrated execution time tracking in the following scripts:
29+
- Get-AbrADDomainObject.ps1
30+
- Get-AbrADDuplicateObject.ps1
31+
- Get-AbrADDuplicateSPN.ps1
32+
- Get-AbrADExchange.ps1
33+
- Get-AbrADFSMO.ps1
34+
- Get-AbrADForest.ps1
35+
- Get-AbrADGPO.ps1
36+
- Get-AbrADHardening.ps1
37+
- Get-AbrADInfrastructureService.ps1
38+
- Get-AbrADKerberosAudit.ps1
39+
- Get-AbrADOU.ps1
40+
- Get-AbrADSecurityAssessment.ps1
41+
- Get-AbrADSite.ps1
42+
- Get-AbrADSiteReplication.ps1
43+
- Get-AbrADTrust.ps1
44+
- Get-AbrDHCPinAD.ps1
45+
- Get-AbrDNSSection.ps1
46+
- Get-AbrDomainSection.ps1
47+
- Get-AbrForestSection.ps1
48+
- Get-AbrPKISection.ps1
49+
- Removed unnecessary comments and cleaned up code for better readability.
50+
51+
### Fixed
52+
53+
- Fix message in Get-AbrDiagrammer function to correctly reference DiagramType
54+
1055
## [0.9.4] - 2025-04-28
1156

1257
### Added

Src/Private/Get-AbrADCAAIA.ps1

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ function Get-AbrADCAAIA {
55
.DESCRIPTION
66
77
.NOTES
8-
Version: 0.9.2
8+
Version: 0.9.5
99
Author: Jonathan Colon
1010
Twitter: @jcolonfzenpr
1111
Github: rebelinux
@@ -23,7 +23,7 @@ function Get-AbrADCAAIA {
2323
)
2424

2525
begin {
26-
Write-PScriboMessage "Collecting Active Directory Certification Authority Information Access details."
26+
Show-AbrDebugExecutionTime -Start -TitleMessage "CA Authority Information Access Objects"
2727
}
2828

2929
process {
@@ -33,7 +33,7 @@ function Get-AbrADCAAIA {
3333
BlankLine
3434
try {
3535
$OutObj = @()
36-
Write-PScriboMessage "Collecting AD CA Authority Information Access information on $($CA.Name)."
36+
Write-PScriboMessage -Message "Collecting AD CA Authority Information Access information on $($CA.Name)."
3737
$AIA = Get-AuthorityInformationAccess -CertificationAuthority $CA
3838
foreach ($URI in $AIA.URI) {
3939
try {
@@ -57,16 +57,24 @@ function Get-AbrADCAAIA {
5757
}
5858
$OutObj | Table @TableParams
5959
} catch {
60-
Write-PScriboMessage -IsWarning "Authority Information Access Item $($URI.RegURI) Section: $($_.Exception.Message)"
60+
Write-PScriboMessage -IsWarning -Message "Authority Information Access Item $($URI.RegURI) Section: $($_.Exception.Message)"
6161
}
6262
}
6363
} catch {
64-
Write-PScriboMessage -IsWarning "Authority Information Access Section: $($_.Exception.Message)"
64+
Write-PScriboMessage -IsWarning -Message "Authority Information Access Section: $($_.Exception.Message)"
6565
}
6666
}
6767
}
6868
}
6969

70-
end {}
70+
end {
71+
if ($Options.ShowExecutionTime) {
72+
$SectionEndTime = Get-Date
73+
Write-Host "Ending CA Authority Information Access Objects section: $($SectionEndTime)" -ForegroundColor Cyan
74+
$elapsedTime = New-TimeSpan -Start $SectionStartTime -End $SectionEndTime
75+
Write-Host "CA Authority Information Access Objects Section execution time: $($elapsedTime.tostring("hh")) Hours $($elapsedTime.tostring("mm")) Minutes $($elapsedTime.tostring("ss")) Seconds"
76+
}
77+
Show-AbrDebugExecutionTime -End -TitleMessage "CA Authority Information Access Objects"
78+
}
7179

7280
}

Src/Private/Get-AbrADCACRLSetting.ps1

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ function Get-AbrADCACRLSetting {
55
.DESCRIPTION
66
77
.NOTES
8-
Version: 0.9.1
8+
Version: 0.9.5
99
Author: Jonathan Colon
1010
Twitter: @jcolonfzenpr
1111
Github: rebelinux
@@ -23,7 +23,7 @@ function Get-AbrADCACRLSetting {
2323
)
2424

2525
begin {
26-
Write-PScriboMessage "Collecting AD Certification Authority Certificate Revocation List information from $($CA.Name)."
26+
Show-AbrDebugExecutionTime -Start -TitleMessage "CA Certificate Revocation List Objects"
2727
}
2828

2929
process {
@@ -34,7 +34,7 @@ function Get-AbrADCACRLSetting {
3434
Section -Style Heading4 "CRL Validity Period" {
3535
$OutObj = @()
3636
try {
37-
Write-PScriboMessage "Collecting AD CA CRL Validity Period information on $($CA.Name)."
37+
Write-PScriboMessage -Message "Collecting AD CA CRL Validity Period information on $($CA.Name)."
3838
$CRLs = Get-CRLValidityPeriod -CertificationAuthority $CA
3939
foreach ($VP in $CRLs) {
4040
try {
@@ -47,11 +47,11 @@ function Get-AbrADCACRLSetting {
4747
}
4848
$OutObj += [pscustomobject](ConvertTo-HashToYN $inObj)
4949
} catch {
50-
Write-PScriboMessage -IsWarning "CRL Validity Period $($VP.Name) Section: $($_.Exception.Message)"
50+
Write-PScriboMessage -IsWarning -Message "CRL Validity Period $($VP.Name) Section: $($_.Exception.Message)"
5151
}
5252
}
5353
} catch {
54-
Write-PScriboMessage -IsWarning "CRL Validity Period Section: $($_.Exception.Message)"
54+
Write-PScriboMessage -IsWarning -Message "CRL Validity Period Section: $($_.Exception.Message)"
5555
}
5656

5757
$TableParams = @{
@@ -68,7 +68,7 @@ function Get-AbrADCACRLSetting {
6868
Section -Style Heading4 "CRL Flags Settings" {
6969
$OutObj = @()
7070
try {
71-
Write-PScriboMessage "Collecting AD CA CRL Distribution Point information on $($CA.Name)."
71+
Write-PScriboMessage -Message "Collecting AD CA CRL Distribution Point information on $($CA.Name)."
7272
$CRLs = Get-CertificateRevocationListFlag -CertificationAuthority $CA
7373
foreach ($Flag in $CRLs) {
7474
try {
@@ -79,11 +79,11 @@ function Get-AbrADCACRLSetting {
7979
}
8080
$OutObj += [pscustomobject](ConvertTo-HashToYN $inObj)
8181
} catch {
82-
Write-PScriboMessage -IsWarning "CRL Validity Period $($Flag.Name) Section: $($_.Exception.Message)"
82+
Write-PScriboMessage -IsWarning -Message "CRL Validity Period $($Flag.Name) Section: $($_.Exception.Message)"
8383
}
8484
}
8585
} catch {
86-
Write-PScriboMessage -IsWarning "CRL Validity Period Table Section: $($_.Exception.Message)"
86+
Write-PScriboMessage -IsWarning -Message "CRL Validity Period Table Section: $($_.Exception.Message)"
8787
}
8888

8989
$TableParams = @{
@@ -97,15 +97,15 @@ function Get-AbrADCACRLSetting {
9797
$OutObj | Sort-Object -Property 'CA Name' | Table @TableParams
9898
}
9999
} catch {
100-
Write-PScriboMessage -IsWarning "CRL Validity Period Section: $($_.Exception.Message)"
100+
Write-PScriboMessage -IsWarning -Message "CRL Validity Period Section: $($_.Exception.Message)"
101101
}
102102
try {
103103
Section -Style Heading4 "CRL Distribution Point" {
104104
Paragraph "The following section provides the Certification Authority CRL Distribution Point information."
105105
BlankLine
106106
try {
107107
$OutObj = @()
108-
Write-PScriboMessage "Collecting AD CA CRL Distribution Point information on $($CA.NAme)."
108+
Write-PScriboMessage -Message "Collecting AD CA CRL Distribution Point information on $($CA.NAme)."
109109
$CRL = Get-CRLDistributionPoint -CertificationAuthority $CA
110110
foreach ($URI in $CRL.URI) {
111111
try {
@@ -145,7 +145,7 @@ function Get-AbrADCACRLSetting {
145145
}
146146
}
147147
} catch {
148-
Write-PScriboMessage -IsWarning "$($_.Exception.Message) (CRL Distribution Point)"
148+
Write-PScriboMessage -IsWarning -Message "$($_.Exception.Message) (CRL Distribution Point)"
149149
}
150150
try {
151151
Section -Style Heading3 "AIA and CDP Health Status" {
@@ -156,7 +156,7 @@ function Get-AbrADCACRLSetting {
156156
$CAHealth = Get-EnterprisePKIHealthStatus -CertificateAuthority $CA
157157
foreach ($Health in $CAHealth) {
158158
try {
159-
Write-PScriboMessage "Collecting AIA and CDP Health Status from $($Health.Name)."
159+
Write-PScriboMessage -Message "Collecting AIA and CDP Health Status from $($Health.Name)."
160160
$inObj = [ordered] @{
161161
'CA Name' = $Health.Name
162162
'Childs' = ($Health.Childs).Name
@@ -190,6 +190,8 @@ function Get-AbrADCACRLSetting {
190190
}
191191
}
192192

193-
end {}
193+
end {
194+
Show-AbrDebugExecutionTime -End -TitleMessage "CA Certificate Revocation List Objects"
195+
}
194196

195197
}

Src/Private/Get-AbrADCACryptographyConfig.ps1

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ function Get-AbrADCACryptographyConfig {
55
.DESCRIPTION
66
77
.NOTES
8-
Version: 0.9.1
8+
Version: 0.9.5
99
Author: Jonathan Colon
1010
Twitter: @jcolonfzenpr
1111
Github: rebelinux
@@ -23,7 +23,8 @@ function Get-AbrADCACryptographyConfig {
2323
)
2424

2525
begin {
26-
Write-PScriboMessage "Collecting AD Certification Authority Cryptography Config information."
26+
Write-PScriboMessage -Message "Collecting CA Certification Authority Cryptography Config information."
27+
Show-AbrDebugExecutionTime -Start -TitleMessage "CA Cryptography Configuration"
2728
}
2829

2930
process {
@@ -63,6 +64,8 @@ function Get-AbrADCACryptographyConfig {
6364
}
6465
}
6566

66-
end {}
67+
end {
68+
Show-AbrDebugExecutionTime -End -TitleMessage "CA Cryptography Configuration"
69+
}
6770

6871
}

Src/Private/Get-AbrADCAKeyRecoveryAgent.ps1

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ function Get-AbrADCAKeyRecoveryAgent {
55
.DESCRIPTION
66
77
.NOTES
8-
Version: 0.9.1
8+
Version: 0.9.5
99
Author: Jonathan Colon
1010
Twitter: @jcolonfzenpr
1111
Github: rebelinux
@@ -23,7 +23,8 @@ function Get-AbrADCAKeyRecoveryAgent {
2323
)
2424

2525
begin {
26-
Write-PScriboMessage "Collecting AD Certification Authority Key Recovery Agent information."
26+
Write-PScriboMessage -Message "Collecting AD Certification Authority Key Recovery Agent information."
27+
Show-AbrDebugExecutionTime -Start -TitleMessage "CA Key Recovery Agent"
2728
}
2829

2930
process {
@@ -39,7 +40,7 @@ function Get-AbrADCAKeyRecoveryAgent {
3940
$OutObj += [pscustomobject](ConvertTo-HashToYN $inObj)
4041
}
4142
} catch {
42-
Write-PScriboMessage -IsWarning "$($_.Exception.Message) (Key Recovery Agent Certificate Item)"
43+
Write-PScriboMessage -IsWarning -Message "$($_.Exception.Message) (Key Recovery Agent Certificate Item)"
4344
}
4445

4546
if ($OutObj) {
@@ -61,6 +62,8 @@ function Get-AbrADCAKeyRecoveryAgent {
6162
}
6263
}
6364

64-
end {}
65+
end {
66+
Show-AbrDebugExecutionTime -End -TitleMessage "CA Key Recovery Agent"
67+
}
6568

6669
}

Src/Private/Get-AbrADCARoot.ps1

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ function Get-AbrADCARoot {
55
.DESCRIPTION
66
77
.NOTES
8-
Version: 0.9.3
8+
Version: 0.9.5
99
Author: Jonathan Colon
1010
Twitter: @jcolonfzenpr
1111
Github: rebelinux
@@ -19,7 +19,8 @@ function Get-AbrADCARoot {
1919
)
2020

2121
begin {
22-
Write-PScriboMessage "Collecting AD Certification Authority Per Domain information."
22+
Write-PScriboMessage -Message "Collecting AD Certification Authority Per Domain information."
23+
Show-AbrDebugExecutionTime -Start -TitleMessage "AD Certification Authority Per Domain"
2324
}
2425

2526
process {
@@ -66,6 +67,8 @@ function Get-AbrADCARoot {
6667
}
6768
}
6869

69-
end {}
70+
end {
71+
Show-AbrDebugExecutionTime -End -TitleMessage "AD Certification Authority Per Domain"
72+
}
7073

7174
}

0 commit comments

Comments
 (0)