Skip to content

Commit e5d8d31

Browse files
authored
Merge pull request #203 from rebelinux/dev
0.9.4
2 parents 3994c49 + e78be1e commit e5d8d31

File tree

4 files changed

+54
-19
lines changed

4 files changed

+54
-19
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ 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.4] - 2025-04-24
10+
## [0.9.4] - 2025-04-28
1111

1212
### Added
1313

README.md

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -172,18 +172,30 @@ The **Report** schema provides configuration of the Microsoft AD report informat
172172

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

175-
| Sub-Schema | Setting | Default | Description |
176-
| ----------------------- | ------------------ | --------- | ------------------------------------------------------------------------------------------------------------------------- |
177-
| ShowDefinitionInfo | true/false | False | Toggle to enable/disable Microsoft AD term explanations |
178-
| PSDefaultAuthentication | Negotiate/Kerberos | Negotiate | Allow to set the value of the PSRemoting authentication method. For Workgroup authentication Negotiate value is required. |
179-
| Exclude.Domains | Array List | Empty | Allow to filter on AD Domain FQDN |
180-
| Exclude.DCs | Array List | Empty | Allow to filter on AD Domain Controller Server FQDN. |
181-
| Include.Domains | Array List | Empty | Allow only a list of Active Directory Domain Controller FQDN to document. |
182-
| Include.DCs | Array List | Empty | Allow only a list of Active Directory Domain FQDN to document. |
183-
| WinRMSSL | Bool | True | Allow to enable SSL for WINRM connection |
184-
| WinRMFallbackToNoSSL | Bool | True | Allow to fallback to WINRM without SSL |
185-
| WinRMSSLPort | Int | 5986 | Allow to set tcp port for WinRM over SSL |
186-
| WinRMPort | Int | 5985 | Allow to set tcp port for WinRM |
175+
| Sub-Schema | Setting | Default | Description |
176+
| ----------------------- | ------------------ | --------- | ----------------------------------------------------------------------------- |
177+
| DiagramTheme | string | White | Set the diagram theme (Black/White/Neon) |
178+
| DiagramType | true / false | true | Toggle to enable/disable the export of individual diagram diagrams |
179+
| DiagramWaterMark | string | empty | Set the diagram watermark |
180+
| EnableDiagrams | true / false | false | Toggle to enable/disable infrastructure diagrams |
181+
| EnableDiagramsDebug | true / false | false | Toggle to enable/disable diagram debug option |
182+
| EnableDiagramSignature | true / false | false | Toggle to enable/disable diagram signature (bottom right corner) |
183+
| EnableHardwareInventory | true / false | false | Toggle to enable/disable hardware information |
184+
| ExportDiagrams | true / false | true | Toggle to enable/disable diagram export option |
185+
| ExportDiagramsFormat | string array | png | Set the format used to export the infrastructure diagram (dot, png, pdf, svg) |
186+
| Exclude.DCs | Array List | Empty | Allow to filter on AD Domain Controller Server FQDN. |
187+
| Exclude.Domains | Array List | Empty | Allow to filter on AD Domain FQDN |
188+
| Include.DCs | Array List | Empty | Allow only a list of Active Directory Domain FQDN to document. |
189+
| Include.Domains | Array List | Empty | Allow only a list of Active Directory Domain Controller FQDN to document. |
190+
| PSDefaultAuthentication | Negotiate/Kerberos | Negotiate | Allow to set the value of the PSRemoting authentication method. |
191+
| | | | For Workgroup authentication Negotiate value is required. |
192+
| ShowDefinitionInfo | true/false | False | Toggle to enable/disable Microsoft AD term explanations |
193+
| SignatureAuthorName | string | empty | Set the signature author name |
194+
| SignatureCompanyName | string | empty | Set the signature company name |
195+
| WinRMFallbackToNoSSL | Bool | True | Allow to fallback to WINRM without SSL |
196+
| WinRMPort | Int | 5985 | Allow to set tcp port for WinRM |
197+
| WinRMSSL | Bool | True | Allow to enable SSL for WINRM connection |
198+
| WinRMSSLPort | Int | 5986 | Allow to set tcp port for WinRM over SSL |
187199

188200

189201
### InfoLevel

Src/Private/SharedUtilsFunctions.ps1

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2427,6 +2427,11 @@ function Get-DCWinRMState {
24272427
[string]$ComputerName,
24282428
[ref]$DCStatus
24292429
)
2430+
$PingStatus = switch (Test-Connection -ComputerName $ComputerName -Count 2 -Quiet) {
2431+
'True' { "Online" }
2432+
'False' { "Offline" }
2433+
}
2434+
24302435
Write-PScriboMessage -Message "Validating WinRM status of $ComputerName in Cache"
24312436
if ($DCStatus.Value | Where-Object { $_.DCName -eq $ComputerName -and $_.Status -eq 'Offline' -and $_.Protocol -eq 'WinRMSSL' }) {
24322437
Write-PScriboMessage -Message "Valid WinRM status of $ComputerName found in Cache: Offline"
@@ -2464,6 +2469,7 @@ function Get-DCWinRMState {
24642469
DCName = $ComputerName
24652470
Status = 'Online'
24662471
Protocol = $WinRMType
2472+
PingStatus = $PingStatus
24672473
}
24682474
Write-PScriboMessage -Message "WinRM status in $ComputerName is Online ($WinRMType)."
24692475
return $true
@@ -2479,6 +2485,7 @@ function Get-DCWinRMState {
24792485
DCName = $ComputerName
24802486
Status = 'Online'
24812487
Protocol = $WinRMType
2488+
PingStatus = $PingStatus
24822489
}
24832490
return $true
24842491
} else {
@@ -2487,6 +2494,7 @@ function Get-DCWinRMState {
24872494
DCName = $ComputerName
24882495
Status = 'Offline'
24892496
Protocol = $WinRMType
2497+
PingStatus = $PingStatus
24902498
}
24912499
return $false
24922500
}
@@ -2496,6 +2504,7 @@ function Get-DCWinRMState {
24962504
DCName = $ComputerName
24972505
Status = 'Offline'
24982506
Protocol = $WinRMType
2507+
PingStatus = $PingStatus
24992508
}
25002509
Write-PScriboMessage -Message "Unable to connect to $ComputerName through $WinRMType."
25012510
return $false
@@ -2755,4 +2764,21 @@ function Get-ValidCIMSession {
27552764
}
27562765
}
27572766
}
2758-
}# end
2767+
}# end
2768+
2769+
function Format-Color([hashtable] $Colors = @{}, [switch] $SimpleMatch) {
2770+
# taken from https://www.bgreco.net/powershell/format-color/
2771+
$lines = ($Input | Out-String) -replace "`r", "" -split "`n"
2772+
foreach ($Line in $Lines) {
2773+
$Color = ''
2774+
foreach ($Pattern in $Colors.Keys) {
2775+
if ((-Not $SimpleMatch) -and $Line -match $Pattern) { $color = $Colors[$Pattern] }
2776+
elseif ($SimpleMatch -and $Line -like $Pattern) { $color = $Colors[$Pattern] }
2777+
}
2778+
if ($color) {
2779+
Write-Host -ForegroundColor $Colors $Line
2780+
} else {
2781+
Write-Host $Line
2782+
}
2783+
}
2784+
}

Src/Public/Invoke-AsBuiltReport.Microsoft.AD.ps1

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -179,18 +179,15 @@ function Invoke-AsBuiltReport.Microsoft.AD {
179179
# Connection Status Section #
180180
#---------------------------------------------------------------------------------------------#
181181

182-
$DCOffine = $DCStatus | Where-Object { $Null -ne $_.DCName -and $_.Status -eq 'Offline' }
182+
$DCOffine = $DCStatus | Where-Object { $Null -ne $_.DCName -and $_.Status -eq 'Offline' } | Select-Object -Property @{N = 'Name'; E = { $_.DCName } }, @{N = 'WinRM Status'; E = { $_.Status } }, @{N = 'Ping Status'; E = { $_.PingStatus } }, @{N = 'Protocol'; E = { $_.Protocol } } | ForEach-Object { [pscustomobject]$_ }
183183
$DomainOffline = $DomainStatus | Where-Object { $Null -ne $_.Name -and $_.Status -eq 'Offline' }
184184
if ($DCOffine -or $DomainOffline) {
185185
Write-Host "`r`n"
186186
Write-Host "The following Systems could not be reached:`n"
187187
if ($DCOffine) {
188188
Write-Host "Domain Controllers"
189189
Write-Host "------------------"
190-
$DCOffine | ForEach-Object {
191-
Write-Host "$($_.DCName)"
192-
}
193-
Write-Host "`r`n"
190+
$DCOffine | Format-Table -AutoSize | Out-String | Write-Host
194191
}
195192
if ($DomainOffline) {
196193
Write-Host "Domains"

0 commit comments

Comments
 (0)