diff --git a/Private/Invoke.GPOZaurrBlockedInheritance.ps1 b/Private/Invoke.GPOZaurrBlockedInheritance.ps1 index f58b870..71f33d9 100644 --- a/Private/Invoke.GPOZaurrBlockedInheritance.ps1 +++ b/Private/Invoke.GPOZaurrBlockedInheritance.ps1 @@ -110,6 +110,23 @@ } -FontSize 10pt } New-HTMLText -FontSize 10pt -Text "Please review output in table and follow the steps below table to get Active Directory Group Policies in healthy state." + + if ($Script:Reporting['GPOBlockedInheritance']['Exclusions']) { + New-HTMLText -LineBreak + New-HTMLText -Text @( + "While preparing this report following exclusions were defined. " + "Please make sure that when you execute your steps to include those exclusions to prevent any issues. " + ) -FontSize 10pt + + New-HTMLText -LineBreak + New-HTMLText -Text "Code to use: " -LineBreak -FontSize 10pt -FontWeight bold + + $Code = New-GPOZaurrExclusions -ExclusionsArray $Script:Reporting['GPOBlockedInheritance']['Exclusions'] + + if ($Code) { + New-HTMLCodeBlock -Code $Code -Style powershell + } + } } Solution = { New-HTMLSection -Invisible { diff --git a/Private/Invoke.GPOZaurrList.ps1 b/Private/Invoke.GPOZaurrList.ps1 index 308731c..c70a5b4 100644 --- a/Private/Invoke.GPOZaurrList.ps1 +++ b/Private/Invoke.GPOZaurrList.ps1 @@ -298,6 +298,23 @@ New-HTMLListItem -Text 'Invoke-GPOZaurr -FilePath $Env:UserProfile\Desktop\GPOZaurrGPOPListBefore.html -Verbose -Type GPOList' -Color RoyalBlue } -FontSize 10pt New-HTMLText -FontSize 10pt -Text 'Steps above will generate above summary with more details allowing you to get up to date report and steps on how to fix it.' + + if ($Script:Reporting['GPOList']['Exclusions']) { + New-HTMLText -LineBreak + New-HTMLText -Text @( + "While preparing this report following exclusions were defined. " + "Please make sure that when you execute your steps to include those exclusions to prevent any issues. " + ) -FontSize 10pt + + New-HTMLText -LineBreak + New-HTMLText -Text "Code to use: " -LineBreak -FontSize 10pt -FontWeight bold + + $Code = New-GPOZaurrExclusions -ExclusionsArray $Script:Reporting['GPOList']['Exclusions'] + + if ($Code) { + New-HTMLCodeBlock -Code $Code -Style powershell + } + } } Solution = { New-HTMLSection -Invisible { diff --git a/Private/Invoke.GPOZaurrOrganizationalUnit.ps1 b/Private/Invoke.GPOZaurrOrganizationalUnit.ps1 index d5ef1c3..f3f76f8 100644 --- a/Private/Invoke.GPOZaurrOrganizationalUnit.ps1 +++ b/Private/Invoke.GPOZaurrOrganizationalUnit.ps1 @@ -99,6 +99,23 @@ "Please make sure that you really want to unlink GPO or delete Organizational Unit before executing changes. Sometimes it's completly valid to keep one or the other. " "Unlinking GPO from OU that has no Computer or User objects is fairly safe exercise. Removing OU requires a bit more dive in, and should only be executed if you know what you're doing. " ) -FontWeight normal, bold -Color None, Red -FontSize 10pt + + if ($Script:Reporting['GPOOrganizationalUnit']['Exclusions']) { + New-HTMLText -LineBreak + New-HTMLText -Text @( + "While preparing this report following exclusions were defined. " + "Please make sure that when you execute your steps to include those exclusions to prevent any issues. " + ) -FontSize 10pt + + New-HTMLText -LineBreak + New-HTMLText -Text "Code to use: " -LineBreak -FontSize 10pt -FontWeight bold + + $Code = New-GPOZaurrExclusions -ExclusionsArray $Script:Reporting['GPOOrganizationalUnit']['Exclusions'] + + if ($Code) { + New-HTMLCodeBlock -Code $Code -Style powershell + } + } } Solution = { New-HTMLSection -Invisible { diff --git a/Private/Invoke.GPOZaurrOwners.ps1 b/Private/Invoke.GPOZaurrOwners.ps1 index 82c6d90..a9e1d7c 100644 --- a/Private/Invoke.GPOZaurrOwners.ps1 +++ b/Private/Invoke.GPOZaurrOwners.ps1 @@ -140,6 +140,23 @@ New-HTMLListItem -Text "$Domain requires ", $Script:Reporting['GPOOwners']['Variables']['RequiresDiffFixPerDomain'][$Domain], " changes." -FontWeight normal, bold, normal } } -FontSize 10pt + + if ($Script:Reporting['GPOOwners']['Exclusions']) { + New-HTMLText -LineBreak + New-HTMLText -Text @( + "While preparing this report following exclusions were defined. " + "Please make sure that when you execute your steps to include those exclusions to prevent any issues. " + ) -FontSize 10pt + + New-HTMLText -LineBreak + New-HTMLText -Text "Code to use: " -LineBreak -FontSize 10pt -FontWeight bold + + $Code = New-GPOZaurrExclusions -ExclusionsArray $Script:Reporting['GPOOwners']['Exclusions'] + + if ($Code) { + New-HTMLCodeBlock -Code $Code -Style powershell + } + } } Solution = { New-HTMLSection -Invisible {