diff --git a/AsBuiltReport.Microsoft.AD.json b/AsBuiltReport.Microsoft.AD.json index e3c1432..095ff65 100644 --- a/AsBuiltReport.Microsoft.AD.json +++ b/AsBuiltReport.Microsoft.AD.json @@ -44,6 +44,7 @@ }, "CA": { "Status": true + "Statistics": true } } } diff --git a/CHANGELOG.md b/CHANGELOG.md index 68fd178..77c9dc5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -178,4 +178,4 @@ - Added Site Replication Summary - Added Site Replication Failure Summary - Added Group Policy Objects Summary - - Added Organizational Unit summary + - Added Organizational Unit summary \ No newline at end of file diff --git a/Src/Private/Get-AbrADDHCPInfrastructure.ps1 b/Src/Private/Get-AbrADDHCPInfrastructure.ps1 index 76c0f67..c9d946d 100644 --- a/Src/Private/Get-AbrADDHCPInfrastructure.ps1 +++ b/Src/Private/Get-AbrADDHCPInfrastructure.ps1 @@ -73,6 +73,7 @@ function Get-AbrADDHCPInfrastructure { $TableParams['Caption'] = "- $($TableParams.Name)" } $OutObj | Table @TableParams + Section -Style Heading6 'Service Database' { Paragraph "The following section provides a summary of the DHCP servers service database information on $($Domain.ToString().ToUpper())." BlankLine @@ -104,10 +105,11 @@ function Get-AbrADDHCPInfrastructure { } } catch { + Write-PscriboMessage -IsWarning "$($_.Exception.Message) (Service Database)" - } } + } $TableParams = @{ Name = "DHCP Servers Database Information - $($Domain.ToString().ToUpper())" @@ -119,6 +121,7 @@ function Get-AbrADDHCPInfrastructure { } $OutObj | Table @TableParams } + Section -Style Heading6 'Dynamic DNS credentials' { Paragraph "The following section provides a summary of the DHCP Servers Dynamic DNS registration credentials information on $($Domain.ToString().ToUpper())." BlankLine @@ -140,13 +143,15 @@ function Get-AbrADDHCPInfrastructure { } } catch { + Write-PscriboMessage -IsWarning "$($_.Exception.Message) (Dynamic DNS credentials)" - } } + } if ($HealthCheck.DHCP.BP) { $OutObj | Where-Object { $_.'User Name' -eq "-"} | Set-Style -Style Warning -Property 'User Name','Domain Name' } + $TableParams = @{ Name = "DHCP Servers Dynamic DNS Credentials Information - $($Domain.ToString().ToUpper())" List = $false diff --git a/Src/Private/Get-AbrADDHCPv4Scope.ps1 b/Src/Private/Get-AbrADDHCPv4Scope.ps1 index f9ddc2d..81b10c6 100644 --- a/Src/Private/Get-AbrADDHCPv4Scope.ps1 +++ b/Src/Private/Get-AbrADDHCPv4Scope.ps1 @@ -57,7 +57,6 @@ function Get-AbrADDHCPv4Scope { } catch { Write-PscriboMessage -IsWarning "$($_.Exception.Message) (IPv4 Scope Summary)" - } } diff --git a/Src/Private/Get-AbrADDHCPv6Statistic.ps1 b/Src/Private/Get-AbrADDHCPv6Statistic.ps1 index ae13780..ce8d399 100644 --- a/Src/Private/Get-AbrADDHCPv6Statistic.ps1 +++ b/Src/Private/Get-AbrADDHCPv6Statistic.ps1 @@ -54,8 +54,8 @@ function Get-AbrADDHCPv6Statistic { } catch { Write-PscriboMessage -IsWarning "$($_.Exception.Message) (IPv6 Service Statistics Summary)" - } } + } if ($HealthCheck.DHCP.Statistics) { $OutObj | Where-Object { $_.'Percentage In Use' -gt 95} | Set-Style -Style Warning -Property 'Percentage Available','Percentage In Use' diff --git a/Src/Private/Get-AbrADDNSInfrastructure.ps1 b/Src/Private/Get-AbrADDNSInfrastructure.ps1 index 8f24c5a..4dd6736 100644 --- a/Src/Private/Get-AbrADDNSInfrastructure.ps1 +++ b/Src/Private/Get-AbrADDNSInfrastructure.ps1 @@ -68,6 +68,7 @@ function Get-AbrADDNSInfrastructure { } $OutObj | Table @TableParams } + if ($InfoLevel.DNS -ge 2) { Section -Style Heading6 "Domain Controller DNS IP Configuration" { Paragraph "The following section provides information of the DNS IP Configuration." @@ -162,6 +163,7 @@ function Get-AbrADDNSInfrastructure { } } } + if ($InfoLevel.DNS -ge 2) { Section -Style Heading6 "Response Rate Limiting (RRL)" { Paragraph "The following section provides a summary of the DNS Response Rate Limiting configuration." @@ -254,6 +256,7 @@ function Get-AbrADDNSInfrastructure { } } } + Section -Style Heading6 "Forwarder Options" { Paragraph "The following section provides a summary of the DNS Forwarder configuration." BlankLine diff --git a/Src/Private/Get-AbrADDNSZone.ps1 b/Src/Private/Get-AbrADDNSZone.ps1 index 4dd2c63..559fa18 100644 --- a/Src/Private/Get-AbrADDNSZone.ps1 +++ b/Src/Private/Get-AbrADDNSZone.ps1 @@ -71,6 +71,7 @@ function Get-AbrADDNSZone { } $OutObj | Table @TableParams } + if ($InfoLevel.DNS -ge 2) { try { $DCPssSession = New-PSSession $DC -Credential $Cred -Authentication Default @@ -114,6 +115,7 @@ function Get-AbrADDNSZone { Write-PscriboMessage -IsWarning "$($_.Exception.Message) (Zone Delegation)" } } + if ($InfoLevel.DNS -ge 2) { try { $DCPssSession = New-PSSession $DC -Credential $Cred -Authentication Default @@ -153,6 +155,7 @@ function Get-AbrADDNSZone { $OutObj | Table @TableParams } } + Remove-PSSession -Session $DCPssSession } catch { Write-PscriboMessage -IsWarning "$($_.Exception.Message) (Zone Transfers)" @@ -197,6 +200,7 @@ function Get-AbrADDNSZone { $OutObj | Table @TableParams } } + Section -Style Heading5 "$($DC.ToString().ToUpper().Split(".")[0]) Conditional Forwarder" { Paragraph "The following section provides a summary of the DNS Conditional Forwarder information." BlankLine @@ -233,6 +237,7 @@ function Get-AbrADDNSZone { } $OutObj | Table @TableParams } + Remove-PSSession -Session $DCPssSession } if ($InfoLevel.DNS -ge 2) { Section -Style Heading6 "$($DC.ToString().ToUpper().Split(".")[0]) Zone Scope Aging Properties" { diff --git a/Src/Private/Get-AbrADDomainController.ps1 b/Src/Private/Get-AbrADDomainController.ps1 index 45f94ce..9cda877 100644 --- a/Src/Private/Get-AbrADDomainController.ps1 +++ b/Src/Private/Get-AbrADDomainController.ps1 @@ -69,6 +69,7 @@ function Get-AbrADDomainController { } $OutObj | Table @TableParams } + if ($InfoLevel.Domain -ge 2) { Write-PscriboMessage "Collecting AD Domain Controller Hardware information for domain $Domain" Section -Style Heading6 'Hardware Inventory' { @@ -183,6 +184,7 @@ function Get-AbrADDomainController { $OutObj | Table @TableParams } } + Write-PscriboMessage "Collecting AD Domain Controller Time Source information." Section -Style Heading6 'Time Source Information' { Paragraph "The following section provides a summary of the Domain Controller Time Source configuration on $($Domain.ToString().ToUpper())." diff --git a/Src/Private/SharedUtilsFunctions.ps1 b/Src/Private/SharedUtilsFunctions.ps1 index 46d0e7f..59502f9 100644 --- a/Src/Private/SharedUtilsFunctions.ps1 +++ b/Src/Private/SharedUtilsFunctions.ps1 @@ -21,7 +21,6 @@ function ConvertTo-TextYN { Position = 0, Mandatory)] [AllowEmptyString()] - [string] $TEXT ) diff --git a/Src/Public/Invoke-AsBuiltReport.Microsoft.AD.ps1 b/Src/Public/Invoke-AsBuiltReport.Microsoft.AD.ps1 index f134c0f..c0705c6 100644 --- a/Src/Public/Invoke-AsBuiltReport.Microsoft.AD.ps1 +++ b/Src/Public/Invoke-AsBuiltReport.Microsoft.AD.ps1 @@ -85,6 +85,7 @@ function Invoke-AsBuiltReport.Microsoft.AD { #---------------------------------------------------------------------------------------------# # Domain Section # #---------------------------------------------------------------------------------------------# + if ($InfoLevel.Domain -ge 1) { Section -Style Heading3 "Active Directory Domain Information" { if ($Options.ShowDefinitionInfo) { @@ -308,6 +309,7 @@ function Invoke-AsBuiltReport.Microsoft.AD { #---------------------------------------------------------------------------------------------# # Certificate Authority Section # #---------------------------------------------------------------------------------------------# + if ($InfoLevel.CA -ge 1) { try { Section -Style Heading3 "Certificate Authority Summary" {