Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved logging message in some circumstances #134

Merged
merged 3 commits into from
Oct 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Src/Private/Get-AbrADDCDiag.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ function Get-AbrADDCDiag {
$OutObj | Sort-Object -Property 'Entity' | Table @TableParams
}
} else {
Write-PscriboMessage "No DCDiag information found, disabling section"
Write-PscriboMessage -IsWarning "No DCDiag information found in $DC, disabling the section."
}
}
catch {
Expand Down
6 changes: 3 additions & 3 deletions Src/Private/Get-AbrADDFSHealth.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ function Get-AbrADDFSHealth {
}
}
} else {
Write-PscriboMessage "No DFS information found, disabling section"
Write-PscriboMessage -IsWarning "No DFS information found in $Domain, disabling the section."
}
}
catch {
Expand Down Expand Up @@ -157,7 +157,7 @@ function Get-AbrADDFSHealth {
}
}
} else {
Write-PscriboMessage "No SYSVOL folder information found, disabling section"
Write-PscriboMessage -IsWarning "No SYSVOL folder information found in $Domain, disabling the section."
}
if ($DCPssSession) {
Remove-PSSession -Session $DCPssSession
Expand Down Expand Up @@ -221,7 +221,7 @@ function Get-AbrADDFSHealth {
}
}
} else {
Write-PscriboMessage "No NETLOGON folder information found, disabling section"
Write-PscriboMessage -IsWarning "No NETLOGON folder information found in $Domain, disabling the section."
}
if ($DCPssSession) {
Remove-PSSession -Session $DCPssSession
Expand Down
12 changes: 6 additions & 6 deletions Src/Private/Get-AbrADDNSZone.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,15 @@ function Get-AbrADDNSZone {
}
}
} else {
Write-PscriboMessage "No Zone Delegation information found, disabling section"
Write-PscriboMessage -IsWarning "No Zone Delegation information found, disabling the section."
}
}
catch {
Write-PscriboMessage -IsWarning "$($_.Exception.Message) (Zone Delegation Item)"
}
}
} else {
Write-PscriboMessage "No Zone Delegation information found, disabling section"
Write-PscriboMessage -IsWarning "No Zone Delegation information found in $DC, disabling the section."
}

if ($OutObj) {
Expand Down Expand Up @@ -171,7 +171,7 @@ function Get-AbrADDNSZone {
}
}
} else {
Write-PscriboMessage "No Zone Transfer information found, disabling section"
Write-PscriboMessage -IsWarning "No Zone Transfer information found in $DC, disabling the section."
}
}
catch {
Expand Down Expand Up @@ -214,7 +214,7 @@ function Get-AbrADDNSZone {
$OutObj | Sort-Object -Property 'Zone Name' | Table @TableParams
}
} else {
Write-PscriboMessage "No Reverse lookup zone information found, disabling section"
Write-PscriboMessage -IsWarning "No Reverse lookup zone information found in $DC, disabling the section."
}
}
catch {
Expand Down Expand Up @@ -254,7 +254,7 @@ function Get-AbrADDNSZone {
$OutObj | Sort-Object -Property 'Zone Name' | Table @TableParams
}
} else {
Write-PscriboMessage "No Conditional forwarder zone information found, disabling section"
Write-PscriboMessage -IsWarning "No Conditional forwarder zone information found in $DC, disabling the section."
}
}
catch {
Expand Down Expand Up @@ -311,7 +311,7 @@ function Get-AbrADDNSZone {
}
}
} else {
Write-PscriboMessage "No Zone Aging property information found, disabling section"
Write-PscriboMessage -IsWarning "No Zone Aging property information found in $DC, disabling the section."
}
}
catch {
Expand Down
2 changes: 1 addition & 1 deletion Src/Private/Get-AbrADDomainLastBackup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ function Get-AbrADDomainLastBackup {
}
}
} else {
Write-PscriboMessage "No Naming context last backup information found, disabling section"
Write-PscriboMessage -IsWarning "No Naming context last backup information found in $Domain, disabling the section."
}
}
catch {
Expand Down
2 changes: 1 addition & 1 deletion Src/Private/Get-AbrADDuplicateObject.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ function Get-AbrADDuplicateObject {
}
}
} else {
Write-PscriboMessage "No Duplicate object information found, disabling section"
Write-PscriboMessage -IsWarning "No Duplicate object information found in $Domain, disabling the section."
}
}
catch {
Expand Down
2 changes: 1 addition & 1 deletion Src/Private/Get-AbrADDuplicateSPN.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ function Get-AbrADDuplicateSPN {
}
}
} else {
Write-PscriboMessage "No Duplicate SPN information found, disabling section"
Write-PscriboMessage -IsWarning "No Duplicate SPN information found in $Domain, disabling the section."
}
}
catch {
Expand Down
6 changes: 3 additions & 3 deletions Src/Private/Get-AbrADForest.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ function Get-AbrADForest {
}
}
} else {
Write-PscriboMessage "No Certificate Authority Root information found, disabling section"
Write-PscriboMessage -IsWarning "No Certificate Authority Root information found in $ForestInfo, disabling the section."
}
Write-PscriboMessage "Discovering certificate authority issuers on forest $ForestInfo."
$ConfigNCDN = $Data.PartitionsContainer.Split(',') | Select-Object -Skip 1
Expand Down Expand Up @@ -201,7 +201,7 @@ function Get-AbrADForest {
$OutObj | Sort-Object -Property 'Name' | Table @TableParams
}
} else {
Write-PscriboMessage "No Certificate Authority Issuer information found, disabling section"
Write-PscriboMessage -IsWarning "No Certificate Authority Issuer information found, disabling the section."
}
}
}
Expand Down Expand Up @@ -262,7 +262,7 @@ function Get-AbrADForest {
}
}
} else {
Write-PscriboMessage "No Optional Feature information found, disabling section"
Write-PscriboMessage -IsWarning "No Optional Feature information found in $ForestInfo, disabling the section."
}
}
}
Expand Down
16 changes: 8 additions & 8 deletions Src/Private/Get-AbrADGPO.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ function Get-AbrADGPO {
}
}
} else {
Write-PscriboMessage "No WMI Filter information found, disabling section"
Write-PscriboMessage -IsWarning "No WMI Filter information found in $Domain, disabling the section."
}
}
catch {
Expand Down Expand Up @@ -284,7 +284,7 @@ function Get-AbrADGPO {
}
}
} else {
Write-PscriboMessage "No GPO Central Store information found, disabling section"
Write-PscriboMessage -IsWarning "No GPO Central Store information found in $Domain, disabling the section."
}
}
catch {
Expand Down Expand Up @@ -339,7 +339,7 @@ function Get-AbrADGPO {
$OutObj | Sort-Object -Property 'GPO Name' | Table @TableParams
}
} else {
Write-PscriboMessage "No GPO Logon/Logoff script information found, disabling section"
Write-PscriboMessage -IsWarning "No GPO Logon/Logoff script information found in $Domain, disabling the section."
}
}
catch {
Expand Down Expand Up @@ -395,7 +395,7 @@ function Get-AbrADGPO {
}

} else {
Write-PscriboMessage "No GPO Computer Startup/Shutdown script information found, disabling section"
Write-PscriboMessage -IsWarning "No GPO Computer Startup/Shutdown script information found in $Domain, disabling the section."
}
}
catch {
Expand Down Expand Up @@ -451,7 +451,7 @@ function Get-AbrADGPO {
}
}
} else {
Write-PscriboMessage "No Unlinked Group Policy Objects information found, disabling section"
Write-PscriboMessage -IsWarning "No Unlinked Group Policy Objects information found in $Domain, disabling the section."
}
}
catch {
Expand Down Expand Up @@ -504,7 +504,7 @@ function Get-AbrADGPO {
}
}
} else {
Write-PscriboMessage "No Empty GPO information found, disabling section"
Write-PscriboMessage -IsWarning "No Empty GPO information found in $Domain, disabling the section."
}
}
catch {
Expand Down Expand Up @@ -563,7 +563,7 @@ function Get-AbrADGPO {

}
} else {
Write-PscriboMessage "No Enforced GPO information found, disabling section"
Write-PscriboMessage -IsWarning "No Enforced GPO information found in $Domain, disabling the section."
}
}
catch {
Expand Down Expand Up @@ -664,7 +664,7 @@ function Get-AbrADGPO {
}
}
} else {
Write-PscriboMessage "No Orphaned GPO information found, disabling section"
Write-PscriboMessage -IsWarning "No Orphaned GPO information found in $Domain, disabling the section."
}
}
catch {
Expand Down
2 changes: 1 addition & 1 deletion Src/Private/Get-AbrADInfrastructureService.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ function Get-AbrADInfrastructureService {
}
}
} else {
Write-PscriboMessage "No Infrastructure Services Status information found, disabling section"
Write-PscriboMessage -IsWarning "No Infrastructure Services Status information found in $DC, disabling the section."
}
if ($DCPssSession) {
Remove-PSSession -Session $DCPssSession
Expand Down
6 changes: 3 additions & 3 deletions Src/Private/Get-AbrADKerberosAudit.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ function Get-AbrADKerberosAudit {
}
}
} else {
Write-PscriboMessage "No Unconstrained Kerberos Delegation information found, disabling section"
Write-PscriboMessage -IsWarning "No Unconstrained Kerberos Delegation information found in $Domain, disabling the section."
}
try {
$KRBTGT = $Users | Where-Object {$_.Name -eq 'krbtgt'}
Expand Down Expand Up @@ -120,7 +120,7 @@ function Get-AbrADKerberosAudit {
}
}
} else {
Write-PscriboMessage "No KRBTGT Account Audit information found, disabling section"
Write-PscriboMessage -IsWarning "No KRBTGT Account Audit information found in $Domain, disabling the section."
}
}
catch {
Expand Down Expand Up @@ -172,7 +172,7 @@ function Get-AbrADKerberosAudit {
}
}
} else {
Write-PscriboMessage "No Administrator Account Audit information found, disabling section"
Write-PscriboMessage -IsWarning "No Administrator Account Audit information found in $Domain, disabling the section."
}
}
catch {
Expand Down
2 changes: 1 addition & 1 deletion Src/Private/Get-AbrADOU.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ function Get-AbrADOU {
}
}
} else {
Write-PscriboMessage "No Organizational Units information found, disabling section"
Write-PscriboMessage -IsWarning "No Organizational Units information found in $Domain, disabling the section."
}
}
catch {
Expand Down
8 changes: 4 additions & 4 deletions Src/Private/Get-AbrADSecurityAssessment.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ function Get-AbrADSecurityAssessment {
}
}
} else {
Write-PscriboMessage "No Domain users information found, disabling section"
Write-PscriboMessage -IsWarning "No Domain users information found in $Domain, disabling the section."
}
}
catch {
Expand Down Expand Up @@ -203,7 +203,7 @@ function Get-AbrADSecurityAssessment {
}
}
} else {
Write-PscriboMessage "No Privileged User Assessment information found, disabling section"
Write-PscriboMessage -IsWarning "No Privileged User Assessment information found in $Domain, disabling the section."
}
}
catch {
Expand Down Expand Up @@ -264,7 +264,7 @@ function Get-AbrADSecurityAssessment {
}
}
} else {
Write-PscriboMessage "No Inactive Privileged Accounts information found, disabling section"
Write-PscriboMessage -IsWarning "No Inactive Privileged Accounts information found in $Domain, disabling the section."
}
}
catch {
Expand Down Expand Up @@ -330,7 +330,7 @@ function Get-AbrADSecurityAssessment {
}
}
} else {
Write-PscriboMessage "No Service Accounts Assessment information found, disabling section"
Write-PscriboMessage -IsWarning "No Service Accounts Assessment information found in $Domain, disabling the section."
}
}
catch {
Expand Down
12 changes: 6 additions & 6 deletions Src/Private/Get-AbrADSite.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ function Get-AbrADSite {
}
}
} else {
Write-PscriboMessage "No Connection Objects information found, disabling section"
Write-PscriboMessage -IsWarning "No Connection Objects information found in $Domain, disabling the section."
}
}
catch {
Expand Down Expand Up @@ -276,7 +276,7 @@ function Get-AbrADSite {
}
}
} else {
Write-PscriboMessage "No Missing Subnets in AD information found, disabling section"
Write-PscriboMessage -IsWarning "No Missing Subnets in AD information found in $Domain, disabling the section."
}
}
catch {
Expand All @@ -285,7 +285,7 @@ function Get-AbrADSite {
}
}
} else {
Write-PscriboMessage "No Site Subnets information found, disabling section"
Write-PscriboMessage -IsWarning "No Site Subnets information found in $Domain, disabling the section."
}
}
catch {
Expand Down Expand Up @@ -377,7 +377,7 @@ function Get-AbrADSite {
}
}
} else {
Write-PscriboMessage "No Site Links information found, disabling section"
Write-PscriboMessage -IsWarning "No Site Links information found in $Domain, disabling the section."
}
}
catch {
Expand Down Expand Up @@ -461,15 +461,15 @@ function Get-AbrADSite {
}
}
} else {
Write-PscriboMessage "No Sysvol Replication information found, disabling section"
Write-PscriboMessage -IsWarning "No Sysvol Replication information found in $Domain, disabling the section."
}
}
catch {
Write-PscriboMessage -IsWarning "Sysvol Replication Table Section: $($_.Exception.Message)"
}
}
} else {
Write-PscriboMessage "No Sites information found, disabling section"
Write-PscriboMessage -IsWarning "No Sites information found in $Domain, disabling the section."
}
}
catch {
Expand Down
4 changes: 2 additions & 2 deletions Src/Private/Get-AbrADSiteReplication.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ function Get-AbrADSiteReplication {
}
}
} else {
Write-PscriboMessage "No Replication Connection information found, disabling section"
Write-PscriboMessage -IsWarning "No Replication Connection information found in $Domain, disabling the section."
}
}
catch {
Expand Down Expand Up @@ -173,7 +173,7 @@ function Get-AbrADSiteReplication {
}
}
} else {
Write-PscriboMessage "No Replication Status information found, disabling section"
Write-PscriboMessage -IsWarning "No Replication Status information found in $Domain, disabling the section."
}
if ($DCPssSession) {
Remove-PSSession -Session $DCPssSession
Expand Down
2 changes: 1 addition & 1 deletion Src/Private/Get-AbrADTrust.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ function Get-AbrADTrust {
}
}
} else {
Write-PscriboMessage "No Domain Trust information found, disabling section"
Write-PscriboMessage -IsWarning "No Domain Trust information found in $Domain, disabling the section."
}
}
catch {
Expand Down
Loading