Skip to content

Commit 5f88598

Browse files
authored
Microsoft AD Report 0.5.0 (#13)
* Added CA Section * Updated sample html report * Added ShowDefinitionInfo Variable also delete unfinished sections * Fix try/catch logic * Added Site Subnet Section * Fix Minor Heading Text * Added Domain Controller DNS IP Configuration * Added Zone Transfers also fix Heading and empty content * Added GPO Central Store Repository * added ShowDefinitionInfo variable to main report also fix heading text * Added ShowDefinitionInfo content to ReadMe file * Added v0.5.0 changes
1 parent 21a2750 commit 5f88598

32 files changed

+1627
-1311
lines changed

AsBuiltReport.Microsoft.AD.json

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,14 @@
99
"ShowTableCaptions": true
1010
},
1111
"Options": {
12-
12+
"ShowDefinitionInfo": false
1313
},
1414
"InfoLevel": {
1515
"_comment_": "0 = Disabled, 1 = Enabled, 2 = Adv Summary, 3 = Detailed",
1616
"Forest": 1,
1717
"Domain": 1,
1818
"DHCP": 1,
19-
"DNS": 1,
20-
"CA": 0,
21-
"Security": 0
19+
"DNS": 1
2220
},
2321
"HealthCheck": {
2422
"Domain": {
@@ -27,19 +25,24 @@
2725
},
2826
"DomainController": {
2927
"Diagnostic": true,
30-
"Services": true
28+
"Services": true,
29+
"Software": true
3130
},
3231
"Site": {
3332
"Replication": true
3433
},
3534
"DNS": {
36-
"Aging": true
35+
"Aging": true,
36+
"DP": true
3737
},
3838
"DHCP": {
3939
"Summary": true,
4040
"Credential": true,
4141
"Statistics": true,
4242
"BP": true
43+
},
44+
"CA": {
45+
"Status": true
4346
}
4447
}
4548
}

CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,26 @@
11
# :arrows_counterclockwise: Microsoft AD As Built Report Changelog
22

3+
## [0.5.0] - 2021-10-29
4+
5+
### Added
6+
7+
- Added ShowDefinitionInfo Option (Allows the user to choose whether to enable AD term explanations.)
8+
- Explanation of the ShowDefinitionInfo option has been added to the ReadMe file.
9+
- Added Dynamic DNS Credentials Health Check.
10+
- Added updated HTML Sample Report.
11+
12+
### Changed
13+
14+
- The spelling of the section title has been revised.
15+
- Moved DNS Zone section to InfoLevel 2.
16+
- Moved Role and Feature section to InfoLevel 3.
17+
- Removed Unused InfoLevels (CA & Security).
18+
19+
### Fixed
20+
21+
- Fix try/catch error messages (globally)
22+
- Fix try/catch logic on the DNS Section (Fix [#11](https://github.com/AsBuiltReport/AsBuiltReport.Microsoft.AD/issues/11))
23+
324
## [0.4.0] - 2021-10-08
425

526
### Added

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,11 @@ The **Report** schema provides configuration of the Microsoft AD report informat
141141

142142
The **Options** schema allows certain options within the report to be toggled on or off.
143143

144+
| Sub-Schema | Setting | Default | Description |
145+
|-----------------|--------------|---------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
146+
| ShowDefinitionInfo | true/false | false | Toggle to enable/disable Microsoft AD term explanations
147+
148+
144149
### InfoLevel
145150

146151
The **InfoLevel** schema allows configuration of each section of the report at a granular level. The following sections can be set.

Samples/Sample Microsoft AD As Built Report.html

Lines changed: 421 additions & 657 deletions
Large diffs are not rendered by default.

Src/Private/Get-AbrADCARoot.ps1

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
function Get-AbrADCARoot {
2+
<#
3+
.SYNOPSIS
4+
Used by As Built Report to retrieve Microsoft Active Directory Root Certification Authority information.
5+
.DESCRIPTION
6+
7+
.NOTES
8+
Version: 0.5.0
9+
Author: Jonathan Colon
10+
Twitter: @jcolonfzenpr
11+
Github: rebelinux
12+
.EXAMPLE
13+
14+
.LINK
15+
16+
#>
17+
[CmdletBinding()]
18+
param (
19+
)
20+
21+
begin {
22+
Write-PscriboMessage "Collecting AD Certification Authority Per Domain information."
23+
}
24+
25+
process {
26+
try {
27+
Section -Style Heading3 "$($ForestInfo.toUpper()) Enterprise Root Certificate Authority" {
28+
Paragraph "The following section provides the of the DHCP servers IPv6 Scope Server Options information."
29+
BlankLine
30+
$OutObj = @()
31+
Write-PscriboMessage "Discovering Active Directory Certification Authority information in $($ForestInfo.toUpper())."
32+
$CAs = Get-CertificationAuthority -Enterprise | Where-Object {$_.IsRoot -eq 'True'}
33+
foreach ($CA in $CAs) {
34+
Write-PscriboMessage "Discovered '$(($CAs | Measure-Object).Count)' Active Directory Certification Authority in domain $ForestInfo."
35+
Write-PscriboMessage "Collecting AD Certification Authority Summary information of $CA."
36+
$inObj = [ordered] @{
37+
'CA Name' = $CA.DisplayName
38+
'Server Name' = $CA.ComputerName.ToString().ToUpper().Split(".")[0]
39+
'Type' = $CA.Type
40+
'Config String' = $CA.ConfigString
41+
'Operating System' = $CA.OperatingSystem
42+
'Certificate' = $CA.Certificate
43+
'Status' = $CA.ServiceStatus
44+
}
45+
$OutObj += [pscustomobject]$inobj
46+
}
47+
48+
if ($HealthCheck.CA.Status) {
49+
$OutObj | Where-Object { $_.'Service Status' -notlike 'Running'} | Set-Style -Style Critical -Property 'Service Status'
50+
}
51+
52+
$TableParams = @{
53+
Name = "Certification Authority Summary Information - $($ForestInfo.ToString().ToUpper())"
54+
List = $true
55+
ColumnWidths = 40, 60
56+
}
57+
if ($Report.ShowTableCaptions) {
58+
$TableParams['Caption'] = "- $($TableParams.Name)"
59+
}
60+
$OutObj | Table @TableParams
61+
}
62+
}
63+
catch {
64+
Write-PscriboMessage -IsWarning $_.Exception.Message
65+
}
66+
}
67+
68+
end {}
69+
70+
}
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
function Get-AbrADCAPerDomain {
2+
<#
3+
.SYNOPSIS
4+
Used by As Built Report to retrieve Microsoft Active Directory Subordinate Certification Authority information.
5+
.DESCRIPTION
6+
7+
.NOTES
8+
Version: 0.5.0
9+
Author: Jonathan Colon
10+
Twitter: @jcolonfzenpr
11+
Github: rebelinux
12+
.EXAMPLE
13+
14+
.LINK
15+
16+
#>
17+
[CmdletBinding()]
18+
param (
19+
[Parameter (
20+
Position = 0,
21+
Mandatory)]
22+
[string]
23+
$Domain,
24+
$Session,
25+
[string]
26+
$Server
27+
)
28+
29+
begin {
30+
Write-PscriboMessage "Collecting AD Certification Authority Per Domain information."
31+
}
32+
33+
process {
34+
$OutObj = @()
35+
if ($Domain) {
36+
foreach ($Item in $Domain) {
37+
Write-PscriboMessage "Discovering Active Directory Certification Authority information in $($ForestInfo.toUpper())."
38+
$CAs = Get-CertificationAuthority -Enterprise
39+
foreach ($CA in $CAs) {
40+
Write-PscriboMessage "Discovered '$(($CAs | Measure-Object).Count)' Active Directory Certification Authority in domain $ForestInfo."
41+
try {
42+
Write-PscriboMessage "Collecting AD Certification Authority Summary information of $CA."
43+
$inObj = [ordered] @{
44+
'CA Name' = $CA.DisplayName
45+
'Server Name' = $CA.ComputerName.ToString().ToUpper().Split(".")[0]
46+
'Type' = $CA.Type
47+
'Status' = $CA.ServiceStatus
48+
}
49+
$OutObj += [pscustomobject]$inobj
50+
}
51+
catch {
52+
Write-PscriboMessage -IsWarning $_.Exception.Message
53+
}
54+
}
55+
}
56+
57+
if ($HealthCheck.CA.Status) {
58+
$OutObj | Where-Object { $_.'Service Status' -notlike 'Running'} | Set-Style -Style Critical -Property 'Service Status'
59+
}
60+
61+
$TableParams = @{
62+
Name = "Certification Authority Summary Information - $($ForestInfo.ToString().ToUpper())"
63+
List = $false
64+
ColumnWidths = 33, 33, 22, 12
65+
}
66+
if ($Report.ShowTableCaptions) {
67+
$TableParams['Caption'] = "- $($TableParams.Name)"
68+
}
69+
$OutObj | Table @TableParams
70+
}
71+
}
72+
73+
end {}
74+
75+
}

Src/Private/Get-AbrADCASummary.ps1

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
function Get-AbrADCASummary {
2+
<#
3+
.SYNOPSIS
4+
Used by As Built Report to retrieve Microsoft AD Certification Authority information.
5+
.DESCRIPTION
6+
7+
.NOTES
8+
Version: 0.5.0
9+
Author: Jonathan Colon
10+
Twitter: @jcolonfzenpr
11+
Github: rebelinux
12+
.EXAMPLE
13+
14+
.LINK
15+
16+
#>
17+
[CmdletBinding()]
18+
param (
19+
)
20+
21+
begin {
22+
Write-PscriboMessage "Collecting AD Certification Authority information."
23+
}
24+
25+
process {
26+
$OutObj = @()
27+
if ($ForestInfo) {
28+
Write-PscriboMessage "Discovering Active Directory Certification Authority information in $($ForestInfo.toUpper())."
29+
$CAs = Get-CertificationAuthority -Enterprise
30+
foreach ($CA in $CAs) {
31+
Write-PscriboMessage "Discovered '$(($CAs | Measure-Object).Count)' Active Directory Certification Authority in domain $ForestInfo."
32+
try {
33+
Write-PscriboMessage "Collecting AD Certification Authority Summary information of $CA."
34+
$inObj = [ordered] @{
35+
'CA Name' = $CA.DisplayName
36+
'Server Name' = $CA.ComputerName.ToString().ToUpper().Split(".")[0]
37+
'Type' = $CA.Type
38+
'Status' = $CA.ServiceStatus
39+
}
40+
$OutObj += [pscustomobject]$inobj
41+
}
42+
catch {
43+
Write-PscriboMessage -IsWarning $_.Exception.Message
44+
}
45+
}
46+
}
47+
48+
if ($HealthCheck.CA.Status) {
49+
$OutObj | Where-Object { $_.'Service Status' -notlike 'Running'} | Set-Style -Style Critical -Property 'Service Status'
50+
}
51+
52+
$TableParams = @{
53+
Name = "Certification Authority Summary Information - $($ForestInfo.ToString().ToUpper())"
54+
List = $false
55+
ColumnWidths = 33, 33, 22, 12
56+
}
57+
if ($Report.ShowTableCaptions) {
58+
$TableParams['Caption'] = "- $($TableParams.Name)"
59+
}
60+
$OutObj | Table @TableParams
61+
}
62+
63+
end {}
64+
65+
}

Src/Private/Get-AbrADDCDiag.ps1

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ function Get-AbrADDCDiag {
55
.DESCRIPTION
66
77
.NOTES
8-
Version: 0.4.0
8+
Version: 0.5.0
99
Author: Jonathan Colon
1010
Twitter: @jcolonfzenpr
1111
Github: rebelinux
@@ -60,8 +60,7 @@ function Get-AbrADDCDiag {
6060
$OutObj | Table @TableParams
6161
}
6262
catch {
63-
Write-PscriboMessage -IsWarning "Error: Connecting to remote server $DC failed: WinRM cannot complete the operation."
64-
Write-PScriboMessage -IsDebug $_.Exception.Message
63+
Write-PscriboMessage -IsWarning $_.Exception.Message
6564
}
6665
}
6766
}

Src/Private/Get-AbrADDCRoleFeature.ps1

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ function Get-AbrADDCRoleFeature {
55
.DESCRIPTION
66
77
.NOTES
8-
Version: 0.4.0
8+
Version: 0.5.0
99
Author: Jonathan Colon
1010
Twitter: @jcolonfzenpr
1111
Github: rebelinux
@@ -42,7 +42,7 @@ function Get-AbrADDCRoleFeature {
4242
$Features = Invoke-Command -Session $DCPssSession -ScriptBlock {Get-WindowsFeature | Where-Object {$_.installed -eq "True"}}
4343
Remove-PSSession -Session $DCPssSession
4444
foreach ($Feature in $Features) {
45-
Write-PscriboMessage "Collecting Domain Controller Role & Features on $DC."
45+
Write-PscriboMessage "Collecting DC Role & Features: $($Feature.DisplayName) on $DC."
4646
$inObj = [ordered] @{
4747
'Name' = $Feature.DisplayName
4848
'Parent' = $Feature.FeatureType
@@ -64,8 +64,7 @@ function Get-AbrADDCRoleFeature {
6464
}
6565
}
6666
catch {
67-
Write-PscriboMessage -IsWarning "Error: Connecting to remote server $DC failed: WinRM cannot complete the operation."
68-
Write-PScriboMessage -IsDebug $_.Exception.Message
67+
Write-PscriboMessage -IsWarning "$($_.Exception.Message) (Role & Features)"
6968
}
7069
}
7170

0 commit comments

Comments
 (0)