Skip to content

Commit 7f84d8e

Browse files
authored
Merge pull request #213 from rebelinux/dev
v0.9.6
2 parents 5a35d08 + 94c7cf6 commit 7f84d8e

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

+624
-440
lines changed

.github/workflows/Release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66

77
jobs:
88
publish-to-gallery:
9-
runs-on: windows-2019
9+
runs-on: windows-2022
1010
steps:
1111
- uses: actions/checkout@v4
1212
- name: Set PSRepository to Trusted for PowerShell Gallery

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.5'
15+
ModuleVersion = '0.9.6'
1616

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

7676
)

CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,29 @@ 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.6] - 2025-07-23
11+
12+
### Added
13+
14+
- Add System Center Configuration Manager (MEM) information
15+
16+
### Changed
17+
18+
- Update module version to 0.9.6
19+
- Enhance execution time tracking in Get-AbrADDomainObject function
20+
- Enhance output message in Invoke-AsBuiltReport function
21+
- Upgrade Diagrammer.Core module to version `0.2.27`.
22+
- Upgrade Diagrammer.Microsoft.AD module to version `0.2.17`.
23+
- Refactor output object initialization to use ArrayList for improved performance and memory management across multiple scripts.
24+
- Updated instances of output object accumulation to utilize the Add method instead of the += operator, enhancing efficiency in data handling.
25+
- Refine section descriptions across multiple PowerShell scripts for clarity and consistency.
26+
- Updated wording to enhance readability and provide more precise information about the content of each section to better reflect the information presented.
27+
28+
### Fixed
29+
30+
- Fix property names in software object initialization for consistency and clarity (Installed Software section)
31+
- Fix [#210](https://github.com/AsBuiltReport/AsBuiltReport.Microsoft.AD/issues/210)
32+
1033
## [0.9.5] - 2025-05-10
1134

1235
### Added

Src/Private/Get-AbrADCAAIA.ps1

Lines changed: 4 additions & 4 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.5
8+
Version: 0.9.6
99
Author: Jonathan Colon
1010
Twitter: @jcolonfzenpr
1111
Github: rebelinux
@@ -29,13 +29,13 @@ function Get-AbrADCAAIA {
2929
process {
3030
if ($CA) {
3131
Section -Style Heading3 "Authority Information Access (AIA)" {
32-
Paragraph "The following section provides the Certification Authority Information Access details."
32+
Paragraph "This section details the Certification Authority's Authority Information Access (AIA) configuration."
3333
BlankLine
3434
try {
35-
$OutObj = @()
3635
Write-PScriboMessage -Message "Collecting AD CA Authority Information Access information on $($CA.Name)."
3736
$AIA = Get-AuthorityInformationAccess -CertificationAuthority $CA
3837
foreach ($URI in $AIA.URI) {
38+
$OutObj = [System.Collections.ArrayList]::new()
3939
try {
4040
$inObj = [ordered] @{
4141
'Reg URI' = $URI.RegURI
@@ -45,7 +45,7 @@ function Get-AbrADCAAIA {
4545
'Include To Extension' = $URI.IncludeToExtension
4646
'OCSP' = $URI.OCSP
4747
}
48-
$OutObj = [pscustomobject](ConvertTo-HashToYN $inObj)
48+
$OutObj.Add([pscustomobject](ConvertTo-HashToYN $inObj)) | Out-Null
4949

5050
$TableParams = @{
5151
Name = "Authority Information Access - $($CA.Name)"

Src/Private/Get-AbrADCACRLSetting.ps1

Lines changed: 50 additions & 58 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.5
8+
Version: 0.9.6
99
Author: Jonathan Colon
1010
Twitter: @jcolonfzenpr
1111
Github: rebelinux
@@ -29,10 +29,10 @@ function Get-AbrADCACRLSetting {
2929
process {
3030
try {
3131
Section -Style Heading3 "Certificate Revocation List (CRL)" {
32-
Paragraph "The following section provides the Certification Authority CRL Distribution Point information."
32+
Paragraph "This section details the Certification Authority's Certificate Revocation List (CRL) Distribution Point configuration."
3333
BlankLine
3434
Section -Style Heading4 "CRL Validity Period" {
35-
$OutObj = @()
35+
$OutObj = [System.Collections.ArrayList]::new()
3636
try {
3737
Write-PScriboMessage -Message "Collecting AD CA CRL Validity Period information on $($CA.Name)."
3838
$CRLs = Get-CRLValidityPeriod -CertificationAuthority $CA
@@ -45,7 +45,7 @@ function Get-AbrADCACRLSetting {
4545
'Delta CRL' = $VP.DeltaCRL
4646
'Delta CRL Overlap' = $VP.DeltaCRLOverlap
4747
}
48-
$OutObj += [pscustomobject](ConvertTo-HashToYN $inObj)
48+
$OutObj.add([pscustomobject](ConvertTo-HashToYN $inObj)) | Out-Null
4949
} catch {
5050
Write-PScriboMessage -IsWarning -Message "CRL Validity Period $($VP.Name) Section: $($_.Exception.Message)"
5151
}
@@ -66,7 +66,7 @@ function Get-AbrADCACRLSetting {
6666
}
6767
try {
6868
Section -Style Heading4 "CRL Flags Settings" {
69-
$OutObj = @()
69+
$OutObj = [System.Collections.ArrayList]::new()
7070
try {
7171
Write-PScriboMessage -Message "Collecting AD CA CRL Distribution Point information on $($CA.Name)."
7272
$CRLs = Get-CertificateRevocationListFlag -CertificationAuthority $CA
@@ -77,7 +77,7 @@ function Get-AbrADCACRLSetting {
7777
'Server Name' = $Flag.ComputerName.ToString().ToUpper().Split(".")[0]
7878
'CRL Flags' = $Flag.CRLFlags
7979
}
80-
$OutObj += [pscustomobject](ConvertTo-HashToYN $inObj)
80+
$OutObj.Add([pscustomobject](ConvertTo-HashToYN $inObj)) | Out-Null
8181
} catch {
8282
Write-PScriboMessage -IsWarning -Message "CRL Validity Period $($Flag.Name) Section: $($_.Exception.Message)"
8383
}
@@ -101,74 +101,66 @@ function Get-AbrADCACRLSetting {
101101
}
102102
try {
103103
Section -Style Heading4 "CRL Distribution Point" {
104-
Paragraph "The following section provides the Certification Authority CRL Distribution Point information."
104+
Paragraph "This section details the configuration of the Certification Authority's CRL Distribution Points."
105105
BlankLine
106-
try {
107-
$OutObj = @()
108-
Write-PScriboMessage -Message "Collecting AD CA CRL Distribution Point information on $($CA.NAme)."
109-
$CRL = Get-CRLDistributionPoint -CertificationAuthority $CA
110-
foreach ($URI in $CRL.URI) {
111-
try {
112-
$inObj = [ordered] @{
113-
'Reg URI' = $URI.RegURI
114-
'Config URI' = $URI.ConfigURI
115-
'Url Scheme' = $URI.UrlScheme
116-
'ProjectedURI' = $URI.ProjectedURI
117-
'Flags' = ($URI.Flags -join ", ")
118-
'CRL Publish' = $URI.IncludeToExtension
119-
'Delta CRL Publish' = $URI.DeltaCRLPublish
120-
'Add To Cert CDP' = $URI.AddToCertCDP
121-
'Add To Fresh est CRL' = $URI.AddToFreshestCRL
122-
'Add To Crl cdp' = $URI.AddToCrlcdp
123-
}
124-
$OutObj = [pscustomobject](ConvertTo-HashToYN $inObj)
106+
Write-PScriboMessage -Message "Collecting AD CA CRL Distribution Point information on $($CA.NAme)."
107+
$CRL = Get-CRLDistributionPoint -CertificationAuthority $CA
108+
foreach ($URI in $CRL.URI) {
109+
$OutObj = [System.Collections.ArrayList]::new()
110+
try {
111+
$inObj = [ordered] @{
112+
'Reg URI' = $URI.RegURI
113+
'Config URI' = $URI.ConfigURI
114+
'Url Scheme' = $URI.UrlScheme
115+
'ProjectedURI' = $URI.ProjectedURI
116+
'Flags' = ($URI.Flags -join ", ")
117+
'CRL Publish' = $URI.IncludeToExtension
118+
'Delta CRL Publish' = $URI.DeltaCRLPublish
119+
'Add To Cert CDP' = $URI.AddToCertCDP
120+
'Add To Fresh est CRL' = $URI.AddToFreshestCRL
121+
'Add To Crl cdp' = $URI.AddToCrlcdp
122+
}
123+
$OutObj.Add([pscustomobject](ConvertTo-HashToYN $inObj)) | Out-Null
125124

126-
$TableParams = @{
127-
Name = "CRL Distribution Point - $($CA.Name)"
128-
List = $true
129-
ColumnWidths = 40, 60
130-
}
131-
if ($Report.ShowTableCaptions) {
132-
$TableParams['Caption'] = "- $($TableParams.Name)"
133-
}
134-
$OutObj | Table @TableParams
135-
} catch {
136-
Write-PScriboMessage -IsWarning $_.Exception.Message
125+
$TableParams = @{
126+
Name = "CRL Distribution Point - $($CA.Name)"
127+
List = $true
128+
ColumnWidths = 40, 60
137129
}
130+
if ($Report.ShowTableCaptions) {
131+
$TableParams['Caption'] = "- $($TableParams.Name)"
132+
}
133+
$OutObj | Table @TableParams
134+
} catch {
135+
Write-PScriboMessage -IsWarning "CRL Distribution Point Table: $($_.Exception.Message)"
138136
}
139-
} catch {
140-
Write-PScriboMessage -IsWarning $_.Exception.Message
141137
}
142138
}
143139
} catch {
144-
Write-PScriboMessage -IsWarning $_.Exception.Message
140+
Write-PScriboMessage -IsWarning "CRL Distribution Point Section: $($_.Exception.Message)"
145141
}
146142
}
147143
} catch {
148144
Write-PScriboMessage -IsWarning -Message "$($_.Exception.Message) (CRL Distribution Point)"
149145
}
150146
try {
151147
Section -Style Heading3 "AIA and CDP Health Status" {
152-
Paragraph "The following section is intended to perform Certification Authority health status checking by CA certificate chain status and validating all CRL Distribution Point (CDP) and Authority Information Access (AIA) URLs for each certificate in the chain."
148+
Paragraph "This section provides a health check of the Certification Authority by verifying the CA certificate chain status and validating all Certificate Revocation List (CDP) and Authority Information Access (AIA) URLs for each certificate in the chain."
153149
BlankLine
154-
$OutObj = @()
155-
try {
156-
$CAHealth = Get-EnterprisePKIHealthStatus -CertificateAuthority $CA
157-
foreach ($Health in $CAHealth) {
158-
try {
159-
Write-PScriboMessage -Message "Collecting AIA and CDP Health Status from $($Health.Name)."
160-
$inObj = [ordered] @{
161-
'CA Name' = $Health.Name
162-
'Childs' = ($Health.Childs).Name
163-
'Health' = $Health.Status
164-
}
165-
$OutObj += [pscustomobject](ConvertTo-HashToYN $inObj)
166-
} catch {
167-
Write-PScriboMessage -IsWarning $_.Exception.Message
150+
$OutObj = [System.Collections.ArrayList]::new()
151+
$CAHealth = Get-EnterprisePKIHealthStatus -CertificateAuthority $CA
152+
foreach ($Health in $CAHealth) {
153+
try {
154+
Write-PScriboMessage -Message "Collecting AIA and CDP Health Status from $($Health.Name)."
155+
$inObj = [ordered] @{
156+
'CA Name' = $Health.Name
157+
'Childs' = ($Health.Childs).Name
158+
'Health' = $Health.Status
168159
}
160+
$OutObj.Add([pscustomobject](ConvertTo-HashToYN $inObj)) | Out-Null
161+
} catch {
162+
Write-PScriboMessage -IsWarning "AIA and CDP Health Status Table: $($_.Exception.Message)"
169163
}
170-
} catch {
171-
Write-PScriboMessage -IsWarning $_.Exception.Message
172164
}
173165

174166
if ($HealthCheck.CA.Status) {
@@ -186,7 +178,7 @@ function Get-AbrADCACRLSetting {
186178
$OutObj | Sort-Object -Property 'CA Name' | Table @TableParams
187179
}
188180
} catch {
189-
Write-PScriboMessage -IsWarning $_.Exception.Message
181+
Write-PScriboMessage -IsWarning "AIA and CDP Health Status Section: $($_.Exception.Message)"
190182
}
191183
}
192184

Src/Private/Get-AbrADCACryptographyConfig.ps1

Lines changed: 4 additions & 4 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.5
8+
Version: 0.9.6
99
Author: Jonathan Colon
1010
Twitter: @jcolonfzenpr
1111
Github: rebelinux
@@ -32,9 +32,9 @@ function Get-AbrADCACryptographyConfig {
3232
$CryptoConfig = Get-CACryptographyConfig -CertificationAuthority $CA
3333
if ($CryptoConfig) {
3434
Section -Style Heading3 "Cryptography Configuration" {
35-
Paragraph "The following section provides the Certification Authority Cryptography Configuration information."
35+
Paragraph "This section provides detailed information about the cryptography configuration settings of the Certification Authority."
3636
BlankLine
37-
$OutObj = @()
37+
$OutObj = [System.Collections.ArrayList]::new()
3838
try {
3939
$inObj = [ordered] @{
4040
'CA Name' = $CryptoConfig.Name
@@ -45,7 +45,7 @@ function Get-AbrADCACryptographyConfig {
4545
'Alternate Signature Algorithm' = $CryptoConfig.AlternateSignatureAlgorithm
4646
'Provider Is CNG' = $CryptoConfig.ProviderIsCNG
4747
}
48-
$OutObj = [pscustomobject](ConvertTo-HashToYN $inObj)
48+
$OutObj.Add([pscustomobject](ConvertTo-HashToYN $inObj)) | Out-Null
4949

5050
$TableParams = @{
5151
Name = "Cryptography Configuration - $($ForestInfo.ToString().ToUpper())"

Src/Private/Get-AbrADCAKeyRecoveryAgent.ps1

Lines changed: 4 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.5
8+
Version: 0.9.6
99
Author: Jonathan Colon
1010
Twitter: @jcolonfzenpr
1111
Github: rebelinux
@@ -28,7 +28,7 @@ function Get-AbrADCAKeyRecoveryAgent {
2828
}
2929

3030
process {
31-
$OutObj = @()
31+
$OutObj = [System.Collections.ArrayList]::new()
3232
try {
3333
$KRA = Get-CAKRACertificate -CertificationAuthority $CA
3434
if ($KRA.Certificate) {
@@ -37,15 +37,15 @@ function Get-AbrADCAKeyRecoveryAgent {
3737
'Server Name' = $KRA.ComputerName.ToString().ToUpper().Split(".")[0]
3838
'Certificate' = $KRA.Certificate
3939
}
40-
$OutObj += [pscustomobject](ConvertTo-HashToYN $inObj)
40+
$OutObj.Add([pscustomobject](ConvertTo-HashToYN $inObj)) | Out-Null
4141
}
4242
} catch {
4343
Write-PScriboMessage -IsWarning -Message "$($_.Exception.Message) (Key Recovery Agent Certificate Item)"
4444
}
4545

4646
if ($OutObj) {
4747
Section -Style Heading3 "Key Recovery Agent Certificate" {
48-
Paragraph "The following section provides the Key Recovery Agent certificate used to encrypt user's certificate private key and store it in CA database. In the case when user cannot access his or her certificate private key it is possible to recover it by Key Recovery Agent if Key Archival procedure was taken against particular certificate."
48+
Paragraph "This section provides details about the Key Recovery Agent certificate, which is used to encrypt users' certificate private keys for storage in the CA database. If a user loses access to their certificate private key, the Key Recovery Agent can recover it, provided that key archival was performed for the certificate."
4949
BlankLine
5050
foreach ($Item in $OutObj) {
5151
$TableParams = @{

Src/Private/Get-AbrADCARoot.ps1

Lines changed: 4 additions & 4 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.5
8+
Version: 0.9.6
99
Author: Jonathan Colon
1010
Twitter: @jcolonfzenpr
1111
Github: rebelinux
@@ -27,10 +27,10 @@ function Get-AbrADCARoot {
2727
try {
2828
if ($CAs | Where-Object { $_.IsRoot -like 'True' }) {
2929
Section -Style Heading2 "Enterprise Root Certificate Authority" {
30-
Paragraph "The following section provides the Enterprise Root CA information."
30+
Paragraph "The following section details the Enterprise Root Certificate Authority (CA) configuration and status."
3131
BlankLine
32-
$OutObj = @()
3332
foreach ($CA in ($CAs | Where-Object { $_.IsRoot -like 'True' })) {
33+
$OutObj = [System.Collections.ArrayList]::new()
3434
$inObj = [ordered] @{
3535
'CA Name' = $CA.DisplayName
3636
'Server Name' = $CA.ComputerName.ToString().ToUpper().Split(".")[0]
@@ -43,7 +43,7 @@ function Get-AbrADCARoot {
4343
}
4444
'Status' = $CA.ServiceStatus
4545
}
46-
$OutObj = [pscustomobject](ConvertTo-HashToYN $inObj)
46+
$OutObj.Add([pscustomobject](ConvertTo-HashToYN $inObj)) | Out-Null
4747

4848
if ($HealthCheck.CA.Status) {
4949
$OutObj | Where-Object { $_.'Service Status' -notlike 'Running' } | Set-Style -Style Critical -Property 'Service Status'

0 commit comments

Comments
 (0)