Skip to content

Commit

Permalink
Merge pull request #19 from jbpaux/fix/typos
Browse files Browse the repository at this point in the history
Fix typos found in generated report
  • Loading branch information
rebelinux authored Jan 12, 2024
2 parents 09b1055 + fe8f591 commit c883dab
Show file tree
Hide file tree
Showing 10 changed files with 78 additions and 78 deletions.
88 changes: 44 additions & 44 deletions Samples/Sample Microsoft DHCP As Built Report.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions Src/Private/Get-AbrADDHCPDomain.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function Get-AbrADDHCPDomain {
$DHCPinDC = ($DHCPinDomain | Where-Object {$_.DnsName.split(".", 2)[1] -eq $DomainInfo.DNSRoot -and $_.DnsName -notin $Options.Exclude.DCs}).DnsName
Get-AbrADDHCPInfrastructure -Domain $DomainInfo.DNSRoot
Section -Style Heading2 "IPv4 Information" {
Paragraph "The following sections detail the configuration of the ipv4 scopes within domain $($DomainInfo.DNSRoot)."
Paragraph "The following sections detail the configuration of the IPv4 scopes within domain $($DomainInfo.DNSRoot)."
BlankLine
try {
Get-AbrADDHCPv4Statistic -Domain $DomainInfo.DNSRoot
Expand Down Expand Up @@ -71,7 +71,7 @@ function Get-AbrADDHCPDomain {
Get-AbrADDHCPv4ScopeServerSetting -Domain $DomainInfo.DNSRoot -Server $DHCPServer
if ($DHCPScopes) {
Section -Style Heading4 "Scope Configuration" {
Paragraph "The following sections detail the configuration of the ipv4 per scope configuration."
Paragraph "The following sections detail the configuration of the IPv4 per scope configuration."
foreach ($Scope in $DHCPScopes) {
Section -Style Heading5 $Scope {
try {
Expand Down Expand Up @@ -144,7 +144,7 @@ function Get-AbrADDHCPDomain {
if (Test-Connection -ComputerName $DHCPServer -Quiet -Count 2) {
$TempCIMSession = New-CIMSession $DHCPServer -Credential $Credential -Authentication $Options.PSDefaultAuthentication -ErrorAction Stop
$DHCPScopes = Get-DhcpServerv6Scope -CimSession $TempCIMSession -ComputerName $DHCPServer | Select-Object -ExpandProperty Prefix
Write-PScriboMessage "Discovering Dhcp Server IPv6 Scopes from $DHCPServer"
Write-PScriboMessage "Discovering DHCP Server IPv6 Scopes from $DHCPServer"
if ($DHCPScopes) {
Section -Style Heading3 "$($DHCPServer.ToUpper().split(".", 2)[0])" {
try {
Expand Down
2 changes: 1 addition & 1 deletion Src/Private/Get-AbrADDHCPInfrastructure.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function Get-AbrADDHCPInfrastructure {
try {
Write-PScriboMessage "Discovered '$(($DHCPinDC | Measure-Object).Count)' DHCP Servers in forest $($Domain)."
Section -Style Heading2 'DHCP Servers in Domain' {
Paragraph "The following table summarises the DHCP servers information within $($Domain.ToString().ToUpper())."
Paragraph "The following table summarizes the DHCP servers information within $($Domain.ToString().ToUpper())."
BlankLine
$OutObj = @()
foreach ($DHCPServer in $DHCPinDC) {
Expand Down
6 changes: 3 additions & 3 deletions Src/Private/Get-AbrADDHCPStandAlone.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function Get-AbrADDHCPStandAlone {
$script:DHCPinDC = $DomainDHCPs
Get-AbrADDHCPInfrastructure -Domain $Domain.split(".", 2).ToUpper()[0]
Section -Style Heading2 "IPv4 Information" {
Paragraph "The following sections detail the configuration of the ipv4 scopes within domain $($Domain)."
Paragraph "The following sections detail the configuration of the IPv4 scopes within domain $($Domain)."
BlankLine
try {
Get-AbrADDHCPv4Statistic -Domain $Domain
Expand Down Expand Up @@ -68,7 +68,7 @@ function Get-AbrADDHCPStandAlone {
Get-AbrADDHCPv4ScopeServerSetting -Domain $Domain -Server $DHCPServer
if ($DHCPScopes) {
Section -Style Heading4 "Scope Configuration" {
Paragraph "The following sections detail the configuration of the ipv4 per scope configuration."
Paragraph "The following sections detail the configuration of the IPv4 per scope configuration."
foreach ($Scope in $DHCPScopes) {
Section -Style Heading5 $Scope {
try {
Expand Down Expand Up @@ -141,7 +141,7 @@ function Get-AbrADDHCPStandAlone {
if (Test-Connection -ComputerName $DHCPServer -Quiet -Count 2) {
$TempCIMSession = New-CIMSession $DHCPServer -Credential $Credential -Authentication $Options.PSDefaultAuthentication -ErrorAction Stop
$DHCPScopes = Get-DhcpServerv6Scope -CimSession $TempCIMSession -ComputerName $DHCPServer | Select-Object -ExpandProperty Prefix
Write-PScriboMessage "Discovering Dhcp Server IPv6 Scopes from $DHCPServer"
Write-PScriboMessage "Discovering DHCP Server IPv6 Scopes from $DHCPServer"
if ($DHCPScopes) {
Section -Style Heading3 "$($DHCPServer.ToUpper().split(".", 2)[0])" {
try {
Expand Down
2 changes: 1 addition & 1 deletion Src/Private/Get-AbrADDHCPv4PerScopePolicy.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ function Get-AbrADDHCPv4PerScopePolicy {
$false {$DHCPPolicy.MacAddress}
default {"Unknown"}
}
'Fqdn' = Switch ([string]::IsNullOrEmpty($DHCPPolicy.Fqdn)) {
'FQDN' = Switch ([string]::IsNullOrEmpty($DHCPPolicy.Fqdn)) {
$true {"--"}
$false {$DHCPPolicy.Fqdn}
default {"Unknown"}
Expand Down
4 changes: 2 additions & 2 deletions Src/Private/Get-AbrADDHCPv4PerScopeProperty.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ function Get-AbrADDHCPv4PerScopeProperty {
'Start Range' = $Exclusion.StartRange
'End Range' = $Exclusion.EndRange
'Subnet Mask' = $Exclusion.SubnetMask
'Delay(ms)' = $Exclusion.Delay
'Delay (ms)' = $Exclusion.Delay
'State' = $Exclusion.State
'Max Bootp Clients' = $Exclusion.MaxBootpClients
'Max BOOTP Clients' = $Exclusion.MaxBootpClients
'Activate Policies' = ConvertTo-EmptyToFiller $Exclusion.ActivatePolicies
'Nap Enable' = ConvertTo-EmptyToFiller $Exclusion.NapEnable
'Nap Profile' = ConvertTo-EmptyToFiller $Exclusion.NapProfile
Expand Down
14 changes: 7 additions & 7 deletions Src/Private/Get-AbrADDHCPv4Scope.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function Get-AbrADDHCPv4Scope {
$DHCPScopes = Get-DhcpServerv4Scope -CimSession $TempCIMSession -ComputerName $Server
if ($DHCPScopes) {
Section -Style Heading4 "Scopes" {
Paragraph "The following sections summarizes the ipv4 scope configuration within $($Server.ToUpper().split(".", 2)[0])."
Paragraph "The following sections summarizes the IPv4 scope configuration within $($Server.ToUpper().split(".", 2)[0])."
BlankLine
$OutObj = @()
foreach ($Scope in $DHCPScopes) {
Expand Down Expand Up @@ -145,16 +145,16 @@ function Get-AbrADDHCPv4Scope {
'Scope Ids' = $Scope.ScopeId.IPAddressToString
'State' = $Scope.State
'Auto State Transition' = ConvertTo-TextYN $Scope.AutoStateTransition
'Authetication Enable' = ConvertTo-TextYN $Scope.EnableAuth
'Authentication Enabled' = ConvertTo-TextYN $Scope.EnableAuth
}
$OutObj = [pscustomobject]$inobj

if ($HealthCheck.DHCP.BP) {
$OutObj | Where-Object { $_.'Authetication Enable' -eq 'No'} | Set-Style -Style Warning -Property 'Authetication Enable'
$OutObj | Where-Object { $_.'Authentication Enabled' -eq 'No'} | Set-Style -Style Warning -Property 'Authentication Enabled'
}

$TableParams = @{
Name = "IPv4 Scope Failover Cofiguration - $($Server.split(".", 2).ToUpper()[0])"
Name = "IPv4 Scope Failover Configuration - $($Server.split(".", 2).ToUpper()[0])"
List = $true
ColumnWidths = 40, 60
}
Expand All @@ -164,12 +164,12 @@ function Get-AbrADDHCPv4Scope {

$OutObj | Table @TableParams

if ($HealthCheck.DHCP.BP -and ($OutObj | Where-Object { $_.'Authetication Enable' -eq 'No'})) {
if ($HealthCheck.DHCP.BP -and ($OutObj | Where-Object { $_.'Authentication Enabled' -eq 'No'})) {
Paragraph "Health Check:" -Bold -Underline
BlankLine
Paragraph {
Text "Corrective Action:" -Bold
Text "Ensure Dhcp servers require authentication (a shared secret) in order to secure communications between failover partners."
Text "Ensure DHCP servers require authentication (a shared secret) in order to secure communications between failover partners."
}
}
}
Expand Down Expand Up @@ -264,7 +264,7 @@ function Get-AbrADDHCPv4Scope {
$false {$DHCPPolicy.MacAddress}
default {"Unknown"}
}
'Fqdn' = Switch ([string]::IsNullOrEmpty($DHCPPolicy.Fqdn)) {
'FQDN' = Switch ([string]::IsNullOrEmpty($DHCPPolicy.Fqdn)) {
$true {"--"}
$false {$DHCPPolicy.Fqdn}
default {"Unknown"}
Expand Down
20 changes: 10 additions & 10 deletions Src/Private/Get-AbrADDHCPv4ScopeServerSetting.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -62,25 +62,25 @@ function Get-AbrADDHCPv4ScopeServerSetting {
try {
$DHCPScopeOptions = Get-DhcpServerv4DnsSetting -CimSession $TempCIMSession -ComputerName $Server
if ($DHCPScopeOptions) {
Section -Style Heading4 "Global DNS Setting" {
Paragraph "The following table summarises the dhcp server ipv4 global dns setting."
Section -Style Heading4 "Global DNS Settings" {
Paragraph "The following table summarizes the DHCP server IPv4 global DNS settings."
BlankLine
$OutObj = @()
foreach ($Option in $DHCPScopeOptions) {
try {
Write-PscriboMessage "Collecting DHCP Server IPv4 global DNS Setting value from $($Server)."
Write-PscriboMessage "Collecting DHCP Server IPv4 global DNS Settings value from $($Server)."
$inObj = [ordered] @{
'Dynamic Updates' = $Option.DynamicUpdates
'Dns Suffix' = ConvertTo-EmptyToFiller $Option.DnsSuffix
'DNS Suffix' = ConvertTo-EmptyToFiller $Option.DnsSuffix
'Name Protection' = ConvertTo-EmptyToFiller $Option.NameProtection
'Update Dns RR For Older Clients' = ConvertTo-EmptyToFiller $Option.UpdateDnsRRForOlderClients
'Disable Dns Ptr RR Update' = ConvertTo-EmptyToFiller $Option.DisableDnsPtrRRUpdate
'Delete Dns RR On Lease Expiry' = ConvertTo-EmptyToFiller $Option.DeleteDnsRROnLeaseExpiry
'Update DNS RR For Older Clients' = ConvertTo-EmptyToFiller $Option.UpdateDnsRRForOlderClients
'Disable DNS PTR RR Update' = ConvertTo-EmptyToFiller $Option.DisableDnsPtrRRUpdate
'Delete DNS RR On Lease Expiry' = ConvertTo-EmptyToFiller $Option.DeleteDnsRROnLeaseExpiry
}
$OutObj += [pscustomobject]$inobj
}
catch {
Write-PscriboMessage -IsWarning "$($_.Exception.Message) (global DNS Setting Item)"
Write-PscriboMessage -IsWarning "$($_.Exception.Message) (global DNS Settings Item)"
}
}

Expand All @@ -90,7 +90,7 @@ function Get-AbrADDHCPv4ScopeServerSetting {
}

$TableParams = @{
Name = "Global DNS Setting - $($Server.split(".", 2).ToUpper()[0])"
Name = "Global DNS Settings - $($Server.split(".", 2).ToUpper()[0])"
List = $true
ColumnWidths = 40, 60
}
Expand All @@ -104,7 +104,7 @@ function Get-AbrADDHCPv4ScopeServerSetting {
if ($HealthCheck.DHCP.BP -and ($OutObj | Where-Object { $_.'Dynamic Updates' -ne 'Always'})) {
Paragraph {
Text "Best Practice:" -Bold
Text "'Always dynamically update dns records' should be configured if secure dynamic DNS update is enabled and the domain controller is on the same host as the DHCP server."
Text "'Always dynamically update DNS records' should be configured if secure dynamic DNS update is enabled and the domain controller is on the same host as the DHCP server."
}
BlankLine
}
Expand Down
2 changes: 1 addition & 1 deletion Src/Private/Get-AbrADDHCPv6Scope.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function Get-AbrADDHCPv6Scope {
$DHCPScopes = Get-DhcpServerv6Scope -CimSession $TempCIMSession -ComputerName $Server
if ($DHCPScopes) {
Section -Style Heading4 "Scopes" {
Paragraph "The following sections detail the configuration of the ipv6 scope within $($Server.ToUpper().split(".", 2)[0])."
Paragraph "The following sections detail the configuration of the IPv6 scope within $($Server.ToUpper().split(".", 2)[0])."
BlankLine
$OutObj = @()
foreach ($Scope in $DHCPScopes) {
Expand Down
12 changes: 6 additions & 6 deletions Src/Private/Get-AbrADDHCPv6ScopeServerSetting.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function Get-AbrADDHCPv6ScopeServerSetting {
$DHCPScopeOptions = Get-DhcpServerv6OptionValue -CimSession $TempCIMSession -ComputerName $Server
if ($DHCPScopeOptions) {
Section -Style Heading4 "Global Server Options" {
Paragraph "The following table summarises the dhcp server ipv4 global dns setting."
Paragraph "The following table summarizes the DHCP server IPv4 global DNS settings."
BlankLine
Write-PScriboMessage "Discovered '$(($DHCPScopeOptions | Measure-Object).Count)' DHCP scopes server opions on $($Server)."
foreach ($Option in $DHCPScopeOptions) {
Expand Down Expand Up @@ -69,21 +69,21 @@ function Get-AbrADDHCPv6ScopeServerSetting {
$OutObj = @()
foreach ($Option in $DHCPScopeOptions) {
try {
Write-PscriboMessage "Collecting DHCP Server IPv6 Global DNS Setting value from $($Server)."
Write-PscriboMessage "Collecting DHCP Server IPv6 Global DNS Settings value from $($Server)."
$inObj = [ordered] @{
'Dynamic Updates' = $Option.DynamicUpdates
'Name Protection' = ConvertTo-EmptyToFiller $Option.NameProtection
'Delete Dns RR On Lease Expiry' = ConvertTo-EmptyToFiller $Option.DeleteDnsRROnLeaseExpiry
'Delete DNS RR On Lease Expiry' = ConvertTo-EmptyToFiller $Option.DeleteDnsRROnLeaseExpiry
}
$OutObj += [pscustomobject]$inobj
}
catch {
Write-PscriboMessage -IsWarning "$($_.Exception.Message) (IPv6 Global DNS Setting Item)"
Write-PscriboMessage -IsWarning "$($_.Exception.Message) (IPv6 Global DNS Settings Item)"
}
}

$TableParams = @{
Name = "Global DNS Setting - $($Server.split(".", 2).ToUpper()[0])"
Name = "Global DNS Settings - $($Server.split(".", 2).ToUpper()[0])"
List = $true
ColumnWidths = 40, 60
}
Expand All @@ -95,7 +95,7 @@ function Get-AbrADDHCPv6ScopeServerSetting {
}
}
catch {
Write-PscriboMessage -IsWarning "$($_.Exception.Message) (IPv6 Global DNS Setting Table)"
Write-PscriboMessage -IsWarning "$($_.Exception.Message) (IPv6 Global DNS Settings Table)"
}
}
}
Expand Down

0 comments on commit c883dab

Please sign in to comment.