Skip to content

Commit 7ed3e6e

Browse files
authored
Merge pull request #29 from AsBuiltReport/dev
v0.7.0 public release
2 parents 25fd44b + 35f4dee commit 7ed3e6e

28 files changed

+2131
-848
lines changed

.github/workflows/Release.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,18 @@ jobs:
2929
shell: pwsh
3030
run: |
3131
Publish-Module -Path ./ -NuGetApiKey ${{ secrets.PSGALLERY_API_KEY }} -Verbose
32+
tweet:
33+
runs-on: ubuntu-latest
34+
steps:
35+
- uses: Eomm/why-don-t-you-tweet@v1
36+
# We don't want to tweet if the repository is not a public one
37+
if: ${{ !github.event.repository.private }}
38+
with:
39+
# GitHub event payload
40+
# https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#release
41+
tweet-message: "[New Release] ${{ github.event.repository.name }} ${{ github.event.release.tag_name }}! Check out what's new! ${{ github.event.release.html_url }} #AsBuiltReport #PowerShell #Microsoft #Activedirectory #MVP"
42+
env:
43+
TWITTER_CONSUMER_API_KEY: ${{ secrets.TWITTER_CONSUMER_API_KEY }}
44+
TWITTER_CONSUMER_API_SECRET: ${{ secrets.TWITTER_CONSUMER_API_SECRET }}
45+
TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }}
46+
TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}

AsBuiltReport.Microsoft.AD.json

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,26 @@
2323
"HealthCheck": {
2424
"Domain": {
2525
"GMSA": true,
26-
"GPO": true
26+
"GPO": true,
27+
"Backup": true,
28+
"DFS": true,
29+
"SPN": true,
30+
"DuplicateObject": true,
31+
"Security": true
2732
},
2833
"DomainController": {
2934
"Diagnostic": true,
3035
"Services": true,
3136
"Software": true
3237
},
3338
"Site": {
34-
"Replication": true
39+
"Replication": true,
40+
"BestPractice": true
3541
},
3642
"DNS": {
3743
"Aging": true,
38-
"DP": true
44+
"DP": true,
45+
"Zones": true
3946
},
4047
"DHCP": {
4148
"Summary": true,

AsBuiltReport.Microsoft.AD.psd1

Lines changed: 5 additions & 1 deletion
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.6.3'
15+
ModuleVersion = '0.7.0'
1616

1717
# Supported PSEditions
1818
# CompatiblePSEditions = @()
@@ -59,6 +59,10 @@ RequiredModules = @(
5959
@{
6060
ModuleName = 'PSPKI';
6161
ModuleVersion = '3.7.2'
62+
},
63+
@{
64+
ModuleName = 'PSSharedGoods';
65+
ModuleVersion = '0.0.224'
6266
}
6367
)
6468

CHANGELOG.md

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

3+
## [0.7.0] - 2022-03-14
4+
5+
### Added
6+
7+
- Implemented health check explanations.
8+
- Added Health Check:
9+
- Search for Duplicate Object.
10+
- Search for Duplicate SID.
11+
- DFS Health Status
12+
- Search for Account Security Issues.
13+
- Added Naming Context Backup information.
14+
15+
### Changed
16+
17+
- Improve Health Check content.
18+
- Added enabled status on Forest Optional Features section.
19+
20+
### Fixed
21+
22+
- Fix DNS section issues.
23+
- Sort "Organizational Unit" section by path. Closes #27
24+
325
## [0.6.3] - 2022-01-30
426

527
### Changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ PowerShell 5.1 or PowerShell 7, and the following PowerShell modules are require
6868
- [GroupPolicy Module](https://docs.microsoft.com/en-us/powershell/module/grouppolicy/?view=windowsserver2019-ps)
6969
- [DhcpServer Module](https://docs.microsoft.com/en-us/powershell/module/dhcpserver/?view=windowsserver2019-ps)
7070
- [DnsServer Module](https://docs.microsoft.com/en-us/powershell/module/dnsserver/?view=windowsserver2019-ps)
71+
- [PSSharedGoods Module](https://www.powershellgallery.com/packages/PSSharedGoods/)
7172

7273
### Linux & macOS
7374

Samples/Sample Microsoft AD As Built Report.html

Lines changed: 897 additions & 734 deletions
Large diffs are not rendered by default.

Src/Private/Get-AbrADDCDiag.ps1

Lines changed: 1 addition & 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.6.3
8+
Version: 0.7.0
99
Author: Jonathan Colon
1010
Twitter: @jcolonfzenpr
1111
Github: rebelinux
@@ -36,8 +36,6 @@ function Get-AbrADDCDiag {
3636
$DCDIAG = Invoke-DcDiag -DomainController $DC
3737
if ($DCDIAG) {
3838
Section -Style Heading5 "$($DC.ToString().split('.')[0].ToUpper())" {
39-
Paragraph "The following section provides a summary of the Active Directory DC Diagnostic."
40-
BlankLine
4139
$OutObj = @()
4240
Write-PscriboMessage "Discovered Active Directory DCDiag information for DC $DC."
4341
foreach ($Result in $DCDIAG) {

Src/Private/Get-AbrADDCRoleFeature.ps1

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ function Get-AbrADDCRoleFeature {
3434
if ($DCPssSession) {
3535
Write-PscriboMessage "Discovered Active Directory DC Role & Features information of $DC."
3636
Section -Style Heading6 "$($DC.ToString().ToUpper().Split(".")[0])" {
37-
Paragraph "The following section provides a summary of the Domain Controller Role & Features information."
38-
BlankLine
3937
$OutObj = @()
4038
$Features = Invoke-Command -Session $DCPssSession -ScriptBlock {Get-WindowsFeature | Where-Object {$_.installed -eq "True" -and $_.FeatureType -eq 'Role'}}
4139
Remove-PSSession -Session $DCPssSession

Src/Private/Get-AbrADDFSHealth.ps1

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
function Get-AbrADDFSHealth {
2+
<#
3+
.SYNOPSIS
4+
Used by As Built Report to retrieve Microsoft AD Domain DFS Health information.
5+
.DESCRIPTION
6+
7+
.NOTES
8+
Version: 0.7.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+
)
25+
26+
begin {
27+
Write-PscriboMessage "Discovering AD Domain DFS Health information on $Domain."
28+
}
29+
30+
process {
31+
if ($Domain -and $HealthCheck.Domain.DFS) {
32+
try {
33+
$DFS = Get-WinADDFSHealth -Domain $Domain
34+
Write-PscriboMessage "Discovered AD Domain DFS Health information from $Domain."
35+
if ($DFS) {
36+
Section -Style Heading4 'Health Check - DFS Health' {
37+
Paragraph "The following section details Distributed File System health status for Domain $($Domain.ToString().ToUpper())."
38+
BlankLine
39+
$OutObj = @()
40+
foreach ($DCStatus in $DFS) {
41+
try {
42+
Write-PscriboMessage "Collecting DFS information from $($Domain)."
43+
$inObj = [ordered] @{
44+
'DC Name' = $DCStatus.DomainController
45+
'Replication State' = $DCStatus.ReplicationState
46+
'GPO Count' = $DCStatus.GroupPolicyCount
47+
'Sysvol Count' = $DCStatus.SysvolCount
48+
'Identical Count' = ConvertTo-TextYN $DCStatus.IdenticalCount
49+
'Stop Replication On AutoRecovery' = ConvertTo-TextYN $DCStatus.StopReplicationOnAutoRecovery
50+
51+
}
52+
$OutObj += [pscustomobject]$inobj
53+
}
54+
catch {
55+
Write-PscriboMessage -IsWarning "$($_.Exception.Message) (DFS Health Item)"
56+
}
57+
}
58+
59+
if ($HealthCheck.Domain.DFS) {
60+
$OutObj | Where-Object { $_.'Identical Count' -like 'No' } | Set-Style -Style Warning -Property 'Identical Count'
61+
}
62+
63+
$TableParams = @{
64+
Name = "Domain Last Backup - $($Domain.ToString().ToUpper())"
65+
List = $false
66+
ColumnWidths = 20, 16, 16, 16, 16, 16
67+
}
68+
69+
if ($Report.ShowTableCaptions) {
70+
$TableParams['Caption'] = "- $($TableParams.Name)"
71+
}
72+
$OutObj | Sort-Object -Property 'Naming Context' | Table @TableParams
73+
Paragraph "Health Check:" -Italic -Bold -Underline
74+
Paragraph "Corrective Actions: Ensure an identical GPO/SYSVOL content for the domain controller in all Active Directory domains." -Italic -Bold
75+
}
76+
}
77+
}
78+
catch {
79+
Write-PscriboMessage -IsWarning "$($_.Exception.Message) (DFS Health Table)"
80+
}
81+
}
82+
}
83+
84+
end {}
85+
86+
}

Src/Private/Get-AbrADDHCPInfrastructure.ps1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,10 @@ function Get-AbrADDHCPInfrastructure {
143143
$TableParams['Caption'] = "- $($TableParams.Name)"
144144
}
145145
$OutObj | Sort-Object -Property 'DC Name' | Table @TableParams
146+
if ($HealthCheck.DHCP.BP -and ($OutObj | Where-Object { $_.'User Name' -eq "-"})) {
147+
Paragraph "Health Check:" -Italic -Bold -Underline
148+
Paragraph "Best Practice: Credentials for DNS update should be configured if secure dynamic DNS update is enabled and the domain controller is on the same host as the DHCP server." -Italic -Bold
149+
}
146150
}
147151
}
148152
catch {

0 commit comments

Comments
 (0)