Skip to content

Commit b77de48

Browse files
authored
Merge pull request #181 from rebelinux/dev
v0.8.2
2 parents f907763 + 9f33bbd commit b77de48

17 files changed

+389
-112
lines changed

.github/workflows/Release.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ jobs:
2525
shell: pwsh
2626
run: |
2727
Install-Module -Name PScriboCharts -Repository PSGallery -Force
28+
- name: Install Diagrammer.Core module
29+
shell: pwsh
30+
run: |
31+
Install-Module -Name Diagrammer.Core -Repository PSGallery -Force
2832
- name: Install Diagrammer.Microsoft.AD module
2933
shell: pwsh
3034
run: |
@@ -41,7 +45,7 @@ jobs:
4145
needs: publish-to-gallery
4246
runs-on: ubuntu-latest
4347
steps:
44-
- uses: Eomm/why-don-t-you-tweet@v1
48+
- uses: Eomm/why-don-t-you-tweet@v2
4549
# We don't want to tweet if the repository is not a public one
4650
if: ${{ !github.event.repository.private }}
4751
with:

AsBuiltReport.Microsoft.AD.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
},
2222
"InfoLevel": {
2323
"_comment_": "0 = Disabled, 1 = Enabled, 2 = Adv Summary, 3 = Detailed",
24-
"Forest": 1,
25-
"Domain": 1,
26-
"DNS": 0,
24+
"Forest": 2,
25+
"Domain": 2,
26+
"DNS": 1,
2727
"CA": 0
2828
},
2929
"HealthCheck": {

AsBuiltReport.Microsoft.AD.psd1

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,12 @@
6767
@{
6868
ModuleName = 'Diagrammer.Microsoft.AD';
6969
ModuleVersion = '0.2.3'
70+
},
71+
@{
72+
ModuleName = 'Diagrammer.Core';
73+
ModuleVersion = '0.2.1'
7074
}
75+
7176
)
7277

7378
# Assemblies that must be loaded prior to importing this module

CHANGELOG.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,29 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## [0.8.1] - 2024-05-16
8+
## [0.8.2] - 2024-06-15
9+
10+
### Added
11+
12+
- Add Diagrammer.Core to the module RequiredModules list
913

1014
### Changed
1115

12-
- Improved code to better handle errors
16+
- Improve the code to better handle errors
17+
- Update the Eomm/why-don-t-you-tweet action to v2.0.0
18+
- Increase the default InfoLevel for the Forest and Domain section (InfoLevel 2)
19+
- Enable DNS section by default (InfoLevel 1)
1320

1421
### Fixed
1522

23+
- Fix [#160](https://github.com/AsBuiltReport/AsBuiltReport.Microsoft.AD/issues/160)
1624
- Fix [#168](https://github.com/AsBuiltReport/AsBuiltReport.Microsoft.AD/issues/168)
1725
- Fix [#171](https://github.com/AsBuiltReport/AsBuiltReport.Microsoft.AD/issues/171)
1826
- Fix [#172](https://github.com/AsBuiltReport/AsBuiltReport.Microsoft.AD/issues/172)
1927
- Fix [#174](https://github.com/AsBuiltReport/AsBuiltReport.Microsoft.AD/issues/174)
2028
- Fix [#176](https://github.com/AsBuiltReport/AsBuiltReport.Microsoft.AD/issues/176)
2129
- Fix [#178](https://github.com/AsBuiltReport/AsBuiltReport.Microsoft.AD/issues/178)
30+
- Fix [#180](https://github.com/AsBuiltReport/AsBuiltReport.Microsoft.AD/issues/180)
2231

2332
## [0.8.1] - 2024-05-16
2433

README.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
Microsoft AD As Built Report is a PowerShell module which works in conjunction with [AsBuiltReport.Core](https://github.com/AsBuiltReport/AsBuiltReport.Core).
3434

35-
[AsBuiltReport](https://github.com/AsBuiltReport/AsBuiltReport) is an open-sourced community project which utilises PowerShell to produce as-built documentation in multiple document formats for multiple vendors and technologies.
35+
[AsBuiltReport](https://github.com/AsBuiltReport/AsBuiltReport) is an open-sourced community project which utilizes PowerShell to produce as-built documentation in multiple document formats for multiple vendors and technologies.
3636

3737
Please refer to the AsBuiltReport [website](https://www.asbuiltreport.com) for more detailed information about this project.
3838

@@ -178,20 +178,22 @@ The **InfoLevel** schema allows configuration of each section of the report at a
178178

179179
There are 4 levels (0-3) of detail granularity for each section as follows;
180180

181-
| Setting | InfoLevel | Description |
182-
| :-----: | ----------- | -------------------------------------------------------------------- |
183-
| 0 | Disabled | Does not collect or display any information |
184-
| 1 | Enabled | Provides summarised information for a collection of objects |
185-
| 2 | Adv Summary | Provides condensed, detailed information for a collection of objects |
186-
| 3 | Detailed | Provides detailed information for individual objects |
181+
| Setting | InfoLevel | Description |
182+
| :-----: | ------------ | --------------------------------------------------------------------------------------------------- |
183+
| 0 | Disabled | Does not collect or display any information |
184+
| 1 | Enabled | Provides summarized information for a collection of objects |
185+
| 2 | Adv Summary | Provides condensed, detailed information for a collection of objects |
186+
| 3 | Detailed | Provides detailed information for individual objects |
187+
| 4 | Adv Detailed | Provides detailed information for individual objects, as well as information for associated objects |
188+
187189

188190
The table below outlines the default and maximum **InfoLevel** settings for each section.
189191

190192
| Sub-Schema | Default Setting | Maximum Setting |
191193
| ---------- | :-------------: | :-------------: |
192-
| Forest | 1 | 1 |
193-
| Domain | 1 | 3 |
194-
| DNS | 0 | 2 |
194+
| Forest | 2 | 1 |
195+
| Domain | 2 | 4 |
196+
| DNS | 1 | 2 |
195197
| CA | 0 | 3 |
196198

197199
### Healthcheck

Src/Private/Get-AbrADDCRoleFeature.ps1

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,12 @@ function Get-AbrADDCRoleFeature {
2929

3030
process {
3131
try {
32-
$DCPssSession = New-PSSession $DC -Credential $Credential -Authentication $Options.PSDefaultAuthentication -Name 'ADDCRoleFeature'
32+
$DCPssSession = try { New-PSSession -ComputerName $DC -Credential $Credential -Authentication $Options.PSDefaultAuthentication -Name 'ADDCRoleFeature' -ErrorAction Stop } catch {
33+
if (-Not $_.Exception.MessageId) {
34+
$ErrorMessage = $_.FullyQualifiedErrorId
35+
} else {$ErrorMessage = $_.Exception.MessageId}
36+
Write-PScriboMessage -IsWarning "Roles Section: New-PSSession: Unable to connect to $($DC): $ErrorMessage"
37+
}
3338
if ($DCPssSession) {
3439
$Features = Invoke-Command -Session $DCPssSession -ScriptBlock { Get-WindowsFeature | Where-Object { $_.installed -eq "True" -and $_.FeatureType -eq 'Role' } }
3540
Remove-PSSession -Session $DCPssSession

Src/Private/Get-AbrADDFSHealth.ps1

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ function Get-AbrADDFSHealth {
4343
$inObj = [ordered] @{
4444
'DC Name' = $DCStatus.DomainController
4545
'Replication Status' = Switch ([string]::IsNullOrEmpty($DCStatus.ReplicationState)) {
46-
$true {"Unknown"}
47-
$false {$DCStatus.ReplicationState}
48-
default {"--"}
46+
$true { "Unknown" }
47+
$false { $DCStatus.ReplicationState }
48+
default { "--" }
4949
}
5050
'GPO Count' = $DCStatus.GroupPolicyCount
5151
'Sysvol Count' = $DCStatus.SysvolCount
@@ -104,7 +104,12 @@ function Get-AbrADDFSHealth {
104104
}
105105
try {
106106
$DC = Invoke-Command -Session $TempPssSession { (Get-ADDomain -Identity $using:Domain).ReplicaDirectoryServers | Select-Object -First 1 }
107-
$DCPssSession = New-PSSession $DC -Credential $Credential -Authentication $Options.PSDefaultAuthentication -Name 'DomainSysvolHealth'
107+
$DCPssSession = try { New-PSSession -ComputerName $DC -Credential $Credential -Authentication $Options.PSDefaultAuthentication -Name 'DomainSysvolHealth' -ErrorAction Stop } catch {
108+
if (-Not $_.Exception.MessageId) {
109+
$ErrorMessage = $_.FullyQualifiedErrorId
110+
} else {$ErrorMessage = $_.Exception.MessageId}
111+
Write-PScriboMessage -IsWarning "Sysvol Content Status Section: New-PSSession: Unable to connect to $($DC): $ErrorMessage"
112+
}
108113
# Code taken from ClaudioMerola (https://github.com/ClaudioMerola/ADxRay)
109114
if ($DCPssSession) {
110115
$SYSVOLFolder = Invoke-Command -Session $DCPssSession { Get-ChildItem -Path $('\\' + $using:Domain + '\SYSVOL\' + $using:Domain) -Recurse | Where-Object -FilterScript { $_.PSIsContainer -eq $false } | Group-Object -Property Extension | ForEach-Object -Process {
@@ -166,7 +171,12 @@ function Get-AbrADDFSHealth {
166171
}
167172
try {
168173
$DC = Invoke-Command -Session $TempPssSession { (Get-ADDomain -Identity $using:Domain).ReplicaDirectoryServers | Select-Object -First 1 }
169-
$DCPssSession = New-PSSession $DC -Credential $Credential -Authentication $Options.PSDefaultAuthentication -Name 'NetlogonHealth'
174+
$DCPssSession = try { New-PSSession -ComputerName $DC -Credential $Credential -Authentication $Options.PSDefaultAuthentication -Name 'NetlogonHealth' -ErrorAction Stop } catch {
175+
if (-Not $_.Exception.MessageId) {
176+
$ErrorMessage = $_.FullyQualifiedErrorId
177+
} else {$ErrorMessage = $_.Exception.MessageId}
178+
Write-PScriboMessage -IsWarning "Netlogon Content Status Section: New-PSSession: Unable to connect to $($DC): $ErrorMessage"
179+
}
170180
# Code taken from ClaudioMerola (https://github.com/ClaudioMerola/ADxRay)
171181
if ($DCPssSession) {
172182
$NetlogonFolder = Invoke-Command -Session $DCPssSession { Get-ChildItem -Path $('\\' + $using:Domain + '\NETLOGON\') -Recurse | Where-Object -FilterScript { $_.PSIsContainer -eq $false } | Group-Object -Property Extension | ForEach-Object -Process {

Src/Private/Get-AbrADDNSZone.ps1

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,12 @@ function Get-AbrADDNSZone {
3131

3232
process {
3333
try {
34-
$DCPssSession = New-PSSession $DC -Credential $Credential -Authentication $Options.PSDefaultAuthentication -Name 'DDNSInfrastructure'
34+
$DCPssSession = try { New-PSSession -ComputerName $DC -Credential $Credential -Authentication $Options.PSDefaultAuthentication -Name 'DDNSInfrastructure' -ErrorAction Stop } catch {
35+
if (-Not $_.Exception.MessageId) {
36+
$ErrorMessage = $_.FullyQualifiedErrorId
37+
} else {$ErrorMessage = $_.Exception.MessageId}
38+
Write-PScriboMessage -IsWarning "DNS Zones Section: New-PSSession: Unable to connect to $($DC): $ErrorMessage"
39+
}
3540
$DNSSetting = Get-DnsServerZone -CimSession $TempCIMSession -ComputerName $DC | Where-Object { $_.IsReverseLookupZone -like "False" -and $_.ZoneType -notlike "Forwarder" }
3641
if ($DNSSetting) {
3742
Section -Style Heading3 "$($DC.ToString().ToUpper().Split(".")[0]) DNS Zones" {

0 commit comments

Comments
 (0)