From 5e4c453254ee3e9d05320324686aad001895ca44 Mon Sep 17 00:00:00 2001 From: Przemyslaw Klys Date: Tue, 1 Dec 2020 23:34:22 +0100 Subject: [PATCH] Update list --- Private/Invoke.GPOZaurrList.ps1 | 225 +++++++++++++++++++++++--------- 1 file changed, 164 insertions(+), 61 deletions(-) diff --git a/Private/Invoke.GPOZaurrList.ps1 b/Private/Invoke.GPOZaurrList.ps1 index 9a546ec..79a8c78 100644 --- a/Private/Invoke.GPOZaurrList.ps1 +++ b/Private/Invoke.GPOZaurrList.ps1 @@ -8,6 +8,11 @@ } Processing = { foreach ($GPO in $Script:Reporting['GPOList']['Data']) { + if ($GPO.Enabled -eq $false -or $GPO.Empty -eq $true -or $GPO.Linked -eq $false) { + $Script:Reporting['GPOList']['Variables']['GPONotValid']++ + } else { + $Script:Reporting['GPOList']['Variables']['GPOValid']++ + } if ($GPO.Linked -eq $false -and $GPO.Empty -eq $true) { # Not linked, Empty $Script:Reporting['GPOList']['Variables']['GPOEmptyAndUnlinked']++ @@ -32,14 +37,17 @@ $Script:Reporting['GPOList']['Variables']['GPOLinked']++ } else { # Linked, not EMPTY - $Script:Reporting['GPOList']['Variables']['GPOValid']++ $Script:Reporting['GPOList']['Variables']['GPOLinked']++ $Script:Reporting['GPOList']['Variables']['GPONotEmpty']++ } + if ($GPO.Enabled -eq $true) { + $Script:Reporting['GPOList']['Variables']['GPOEnabled']++ + } else { + $Script:Reporting['GPOList']['Variables']['GPODisabled']++ + } if ($GPO.LinksDisabledCount -eq $GPO.LinksCount -and $GPO.LinksCount -gt 0) { $Script:Reporting['GPOList']['Variables']['GPOLinkedButLinkDisabled']++ } - if ($GPO.ComputerOptimized -eq $true) { $Script:Reporting['GPOList']['Variables']['ComputerOptimizedYes']++ } else { @@ -63,9 +71,19 @@ if ($GPO.UserProblem -or $GPO.ComputerProblem) { $Script:Reporting['GPOList']['Variables']['GPOWithProblems']++ } + if ($GPO.Problem -eq $true) { + $Script:Reporting['GPOList']['Variables']['GPOProblem']++ + } else { + $Script:Reporting['GPOList']['Variables']['GPONoProblem']++ + } + if ($GPO.Optimized -eq $true) { + $Script:Reporting['GPOList']['Variables']['GPOOptimized']++ + } else { + $Script:Reporting['GPOList']['Variables']['GPONotOptimized']++ + } } $Script:Reporting['GPOList']['Variables']['GPOTotal'] = $Script:Reporting['GPOList']['Data'].Count - if ($Script:Reporting['GPOList']['Variables']['GPOEmptyOrUnlinked'] -gt 0) { + if ($Script:Reporting['GPOList']['Variables']['GPONotValid'] -gt 0) { $Script:Reporting['GPOList']['ActionRequired'] = $true } else { $Script:Reporting['GPOList']['ActionRequired'] = $false @@ -81,6 +99,10 @@ UserOptimizedNo = 0 UserProblemYes = 0 UserProblemNo = 0 + GPOOptimized = 0 + GPONotOptimized = 0 + GPOProblem = 0 + GPONoProblem = 0 GPONotLinked = 0 GPOLinked = 0 GPOEmpty = 0 @@ -88,36 +110,15 @@ GPOEmptyAndUnlinked = 0 GPOEmptyOrUnlinked = 0 GPOLinkedButEmpty = 0 + GPOEnabled = 0 + GPODisabled = 0 GPOValid = 0 + GPONotValid = 0 GPOLinkedButLinkDisabled = 0 GPOTotal = 0 } Overview = { - New-HTMLPanel { - New-HTMLText -Text 'Following chart presents ', 'Linked / Empty and Unlinked Group Policies' -FontSize 10pt -FontWeight normal, bold - New-HTMLList -Type Unordered { - New-HTMLListItem -Text 'Group Policies total: ', $Script:Reporting['GPOList']['Variables']['GPOTotal'] -FontWeight normal, bold - New-HTMLListItem -Text "Group Policies valid: ", $Script:Reporting['GPOList']['Variables']['GPOValid'] -FontWeight normal, bold - New-HTMLListItem -Text "Group Policies to delete: ", $Script:Reporting['GPOList']['Variables']['GPOEmptyOrUnlinked'] -FontWeight normal, bold { - New-HTMLList -Type Unordered { - New-HTMLListItem -Text 'Group Policies that are unlinked (are not doing anything currently): ', $Script:Reporting['GPOList']['Variables']['GPONotLinked'] -FontWeight normal, bold - New-HTMLListItem -Text "Group Policies that are empty (have no settings): ", $Script:Reporting['GPOList']['Variables']['GPOEmpty'] -FontWeight normal, bold - New-HTMLListItem -Text "Group Policies that are linked, but empty: ", $Script:Reporting['GPOList']['Variables']['GPOLinkedButEmpty'] -FontWeight normal, bold - New-HTMLListItem -Text "Group Policies that are linked, but link disabled: ", $Script:Reporting['GPOList']['Variables']['GPOLinkedButLinkDisabled'] -FontWeight normal, bold - } - } - } - New-HTMLText -FontSize 10pt -Text 'Usually empty or unlinked Group Policies are safe to delete.' - New-HTMLChart -Title 'Group Policies Summary' { - New-ChartBarOptions -Type barStacked - #New-ChartLegend -Names 'Unlinked', 'Linked', 'Empty', 'Total' -Color Salmon, PaleGreen, PaleVioletRed, PaleTurquoise - New-ChartLegend -Names 'Good', 'Bad' -Color PaleGreen, Salmon - #New-ChartBar -Name 'Group Policies' -Value $Script:Reporting['GPOList']['Variables']['GPONotLinked'], $Script:Reporting['GPOList']['Variables']['GPOLinked'], $Script:Reporting['GPOList']['Variables']['GPOEmpty'], $Script:Reporting['GPOList']['Variables']['GPOTotal'] - New-ChartBar -Name 'Linked' -Value $Script:Reporting['GPOList']['Variables']['GPOLinked'], $Script:Reporting['GPOList']['Variables']['GPONotLinked'] - New-ChartBar -Name 'Empty' -Value $Script:Reporting['GPOList']['Variables']['GPONotEmpty'], $Script:Reporting['GPOList']['Variables']['GPOEmpty'] - New-ChartBar -Name 'Valid' -Value $Script:Reporting['GPOList']['Variables']['GPOValid'], $Script:Reporting['GPOList']['Variables']['GPOEmptyOrUnlinked'] - } -TitleAlignment center - } + } Summary = { New-HTMLText -TextBlock { @@ -129,15 +130,31 @@ New-HTMLList -Type Unordered { New-HTMLListItem -Text 'Group Policies total: ', $Script:Reporting['GPOList']['Variables']['GPOTotal'] -FontWeight normal, bold New-HTMLListItem -Text "Group Policies valid: ", $Script:Reporting['GPOList']['Variables']['GPOValid'] -FontWeight normal, bold - New-HTMLListItem -Text "Group Policies to delete: ", $Script:Reporting['GPOList']['Variables']['GPOEmptyOrUnlinked'] -FontWeight normal, bold { + New-HTMLListItem -Text "Group Policies to delete: ", $Script:Reporting['GPOList']['Variables']['GPONotValid'] -FontWeight normal, bold { New-HTMLList -Type Unordered { New-HTMLListItem -Text 'Group Policies that are unlinked (are not doing anything currently): ', $Script:Reporting['GPOList']['Variables']['GPONotLinked'] -FontWeight normal, bold New-HTMLListItem -Text "Group Policies that are empty (have no settings): ", $Script:Reporting['GPOList']['Variables']['GPOEmpty'] -FontWeight normal, bold New-HTMLListItem -Text "Group Policies that are linked, but empty: ", $Script:Reporting['GPOList']['Variables']['GPOLinkedButEmpty'] -FontWeight normal, bold New-HTMLListItem -Text "Group Policies that are linked, but link disabled: ", $Script:Reporting['GPOList']['Variables']['GPOLinkedButLinkDisabled'] -FontWeight normal, bold + New-HTMLListItem -Text "Group Policies that are disabled (both user/computer sections): ", $Script:Reporting['GPOList']['Variables']['GPODisabled'] -FontWeight normal, bold } } } -FontSize 10pt + New-HTMLText -Text "Keep in mind that each GPO can match multiple conditions such as being empty and unlinked and disabled at the same time. We're only deleting GPO once." -FontSize 10pt + New-HTMLText -Text @( + 'All ', + 'empty', + ' or ', + 'unlinked', + ' or ', + 'disabled', + ' Group Policies can be automatically deleted. Please review output in the table and follow steps below table to cleanup Group Policies. ', + 'GPOs that have content, but are disabled require manual intervention. ', + "If performance is an issue you should consider disabling user or computer sections of GPO when those are not used. " + ) -FontSize 10pt -FontWeight normal, bold, normal, bold, normal, bold, normal, normal, normal, normal + + New-HTMLText -LineBreak + <# New-HTMLText -Text "Additionally, we're reviewing Group Policies that have their section disabled, but contain data. Please review them and make sure this configuration is as expected!" -FontSize 10pt New-HTMLList -Type Unordered { New-HTMLListItem -Text 'Group Policies with problems: ', $Script:Reporting['GPOList']['Variables']['GPOWithProblems'] -FontWeight normal, bold { @@ -162,11 +179,7 @@ } } } -FontSize 10pt - New-HTMLText -TextBlock { - 'All empty or unlinked Group Policies can be automatically deleted. Please review output in the table and follow steps below table to cleanup Group Policies. ' - 'GPOs that have content, but are disabled require manual intervention. ' - "If performance is an issue you should consider disabling user or computer sections of GPO when those are not used. " - } -FontSize 10pt + #> } Solution = { New-HTMLSection -Invisible { @@ -178,8 +191,11 @@ New-ChartBarOptions -Type barStacked New-ChartLegend -Names 'Yes', 'No' -Color SpringGreen, Salmon New-ChartBar -Name 'Linked' -Value $Script:Reporting['GPOList']['Variables']['GPOLinked'], $Script:Reporting['GPOList']['Variables']['GPONotLinked'] - New-ChartBar -Name 'Empty' -Value $Script:Reporting['GPOList']['Variables']['GPONotEmpty'], $Script:Reporting['GPOList']['Variables']['GPOEmpty'] - New-ChartBar -Name 'Valid' -Value $Script:Reporting['GPOList']['Variables']['GPOValid'], $Script:Reporting['GPOList']['Variables']['GPOEmptyOrUnlinked'] + New-ChartBar -Name 'Not Empty' -Value $Script:Reporting['GPOList']['Variables']['GPONotEmpty'], $Script:Reporting['GPOList']['Variables']['GPOEmpty'] + New-ChartBar -Name 'Enabled' -Value $Script:Reporting['GPOList']['Variables']['GPOEnabled'], $Script:Reporting['GPOList']['Variables']['GPODisabled'] + New-ChartBar -Name 'Valid' -Value $Script:Reporting['GPOList']['Variables']['GPOValid'], $Script:Reporting['GPOList']['Variables']['GPONotValid'] + New-ChartBar -Name 'Optimized (for speed)' -Value $Script:Reporting['GPOList']['Variables']['GPOOptimized'], $Script:Reporting['GPOList']['Variables']['GPONotOptimized'] + New-ChartBar -Name 'With problem' -Value $Script:Reporting['GPOList']['Variables']['GPOProblem'], $Script:Reporting['GPOList']['Variables']['GPONoProblem'] New-ChartBar -Name 'With problem (computers)' -Value $Script:Reporting['GPOList']['Variables']['ComputerProblemNo'], $Script:Reporting['GPOList']['Variables']['ComputerProblemYes'] New-ChartBar -Name 'With problem (users)' -Value $Script:Reporting['GPOList']['Variables']['UserProblemNo'], $Script:Reporting['GPOList']['Variables']['UserProblemYes'] New-ChartBar -Name 'Optimized Computers' -Value $Script:Reporting['GPOList']['Variables']['ComputerOptimizedYes'], $Script:Reporting['GPOList']['Variables']['ComputerOptimizedNo'] @@ -188,31 +204,39 @@ } } New-HTMLSection -Name 'Group Policies List' { - New-HTMLTable -DataTable $Script:Reporting['GPOList']['Data'] -Filtering { - New-HTMLTableCondition -Name 'Empty' -Value $true -BackgroundColor Salmon -ComparisonType string - New-HTMLTableCondition -Name 'Linked' -Value $false -BackgroundColor Salmon -ComparisonType string - New-HTMLTableCondition -Name 'ComputerProblem' -Value $true -BackgroundColor Salmon -ComparisonType string - New-HTMLTableCondition -Name 'UserProblem' -Value $true -BackgroundColor Salmon -ComparisonType string - New-HTMLTableCondition -Name 'ComputerOptimized' -Value $false -BackgroundColor Salmon -ComparisonType string - New-HTMLTableCondition -Name 'UserOptimized' -Value $false -BackgroundColor Salmon -TextTransform capitalize -ComparisonType string - # reverse - New-HTMLTableCondition -Name 'Empty' -Value $false -BackgroundColor SpringGreen -ComparisonType string - New-HTMLTableCondition -Name 'Linked' -Value $true -BackgroundColor SpringGreen -ComparisonType string - New-HTMLTableCondition -Name 'ComputerProblem' -Value $false -BackgroundColor SpringGreen -ComparisonType string - New-HTMLTableCondition -Name 'UserProblem' -Value $false -BackgroundColor SpringGreen -ComparisonType string - New-HTMLTableCondition -Name 'ComputerOptimized' -Value $true -BackgroundColor SpringGreen -ComparisonType string - New-HTMLTableCondition -Name 'UserOptimized' -Value $true -BackgroundColor SpringGreen -TextTransform capitalize -ComparisonType string - } -PagingOptions 10, 20, 30, 40, 50 - } - if ($Script:Reporting['GPOList']['WarningsAndErrors']) { - New-HTMLSection -Name 'Warnings & Errors to Review' { - New-HTMLTable -DataTable $Script:Reporting['GPOList']['WarningsAndErrors'] -Filtering { - New-HTMLTableCondition -Name 'Type' -Value 'Warning' -BackgroundColor SandyBrown -ComparisonType string -Row - New-HTMLTableCondition -Name 'Type' -Value 'Error' -BackgroundColor Salmon -ComparisonType string -Row - } + New-HTMLContainer { + New-HTMLText -Text 'Explanation to table columns:' -FontSize 10pt + New-HTMLList { + New-HTMLListItem -FontWeight bold, normal -Text "Empty", " - means GPO has currently no content. It could be there was content, but it was removed, or that it never had content. " + New-HTMLListItem -FontWeight bold, normal -Text "Linked", " - means GPO is linked or unlinked. We need at least one link that is enabled to mark it as linked. If GPO is linked, but all links are disabled, it's not linked. " + New-HTMLListItem -FontWeight bold, normal -Text "Enabled", " - means GPO has at least one section enabled. If enabled is set to false that means both sections are disabled, and therefore GPO is not active. " + New-HTMLListItem -FontWeight bold, normal -Text "Optimized", " - means GPO section that is not in use is disabled. If section (user or computer) is enabled and there is no content, it's not optimized. " + New-HTMLListItem -FontWeight bold, normal -Text "Problem", " - means GPO has one or more section (user or computer) that is disabled, yet there is content in it. " + } -FontSize 10pt + New-HTMLTable -DataTable $Script:Reporting['GPOList']['Data'] -Filtering { + New-HTMLTableCondition -Name 'Empty' -Value $true -BackgroundColor Salmon -ComparisonType string + New-HTMLTableCondition -Name 'Linked' -Value $false -BackgroundColor Salmon -ComparisonType string + New-HTMLTableCondition -Name 'Enabled' -Value $false -BackgroundColor Salmon -ComparisonType string + New-HTMLTableCondition -Name 'Optimized' -Value $false -BackgroundColor Salmon -ComparisonType string + New-HTMLTableCondition -Name 'Problem' -Value $true -BackgroundColor Salmon -ComparisonType string + New-HTMLTableCondition -Name 'ComputerProblem' -Value $true -BackgroundColor Salmon -ComparisonType string + New-HTMLTableCondition -Name 'UserProblem' -Value $true -BackgroundColor Salmon -ComparisonType string + New-HTMLTableCondition -Name 'ComputerOptimized' -Value $false -BackgroundColor Salmon -ComparisonType string + New-HTMLTableCondition -Name 'UserOptimized' -Value $false -BackgroundColor Salmon -TextTransform capitalize -ComparisonType string + # reverse + New-HTMLTableCondition -Name 'Empty' -Value $false -BackgroundColor SpringGreen -ComparisonType string + New-HTMLTableCondition -Name 'Linked' -Value $true -BackgroundColor SpringGreen -ComparisonType string + New-HTMLTableCondition -Name 'Enabled' -Value $true -BackgroundColor SpringGreen -ComparisonType string + New-HTMLTableCondition -Name 'Optimized' -Value $true -BackgroundColor SpringGreen -ComparisonType string + New-HTMLTableCondition -Name 'Problem' -Value $false -BackgroundColor SpringGreen -ComparisonType string + New-HTMLTableCondition -Name 'ComputerProblem' -Value $false -BackgroundColor SpringGreen -ComparisonType string + New-HTMLTableCondition -Name 'UserProblem' -Value $false -BackgroundColor SpringGreen -ComparisonType string + New-HTMLTableCondition -Name 'ComputerOptimized' -Value $true -BackgroundColor SpringGreen -ComparisonType string + New-HTMLTableCondition -Name 'UserOptimized' -Value $true -BackgroundColor SpringGreen -TextTransform capitalize -ComparisonType string + } -PagingOptions 10, 20, 30, 40, 50 } } - New-HTMLSection -Name 'Steps to fix - Empty & Unlinked Group Policies' { + New-HTMLSection -Name 'Steps to fix - Empty & Unlinked & Disabled Group Policies' { New-HTMLContainer { New-HTMLSpanStyle -FontSize 10pt { New-HTMLText -Text 'Following steps will guide you how to remove empty or unlinked group policies' @@ -241,6 +265,21 @@ } New-HTMLText -Text "It provides same data as you see in table above just doesn't prettify it for you." } + New-HTMLWizardStep -Name 'Make a backup' { + New-HTMLText -TextBlock { + "The process of deleting Group Policies is final. Once GPO is removed - it's gone. " + "To make sure you can recover deleted GPO please make sure to back them up. " + } + New-HTMLCodeBlock -Code { + $GPOSummary = Backup-GPOZaurr -BackupPath "$Env:UserProfile\Desktop\GPO" -Verbose -Type All + $GPOSummary | Format-Table # only if you want to display output of backup + } + New-HTMLText -TextBlock { + "Above command when executed will make a backup to Desktop, create GPO folder and within it it will put all those GPOs. " + "Keep in mind that Remove-GPOZaurr command also has a backup feature built-in. " + "It's possible to skip this backup and use the backup provided as part of Remove-GPOZaurr command. " + } + } New-HTMLWizardStep -Name 'Remove GPOs that are EMPTY or UNLINKED' { New-HTMLText -Text @( "Following command when executed removes every ", @@ -251,23 +290,79 @@ "WhatIf", " parameter as shown below to prevent accidental removal.", "Make sure to use BackupPath which will make sure that for each GPO that is about to be deleted a backup is made to folder on a desktop." + "You can skip parameters related to backup if you did backup all GPOs prior to running remove command. " ) -FontWeight normal, bold, normal, bold, normal, bold, normal, normal -Color Black, Red, Black, Red, Black New-HTMLCodeBlock -Code { Remove-GPOZaurr -Type Empty, Unlinked -BackupPath "$Env:UserProfile\Desktop\GPO" -Verbose -WhatIf } New-HTMLText -TextBlock { - "After execution please make sure there are no errors, make sure to review provided output, and confirm that what is about to be deleted matches expected data. Once happy with results please follow with command: " + "Alternatively for multi-domain scenario, if you have limited Domain Admin credentials to a single domain please use following command: " } + New-HTMLCodeBlock -Code { + Remove-GPOZaurr -Type Empty, Unlinked -BackupPath "$Env:UserProfile\Desktop\GPO" -Verbose -WhatIf -IncludeDomains 'YourDomainYouHavePermissionsFor' + } + New-HTMLText -TextBlock { + "After execution please make sure there are no errors, make sure to review provided output, and confirm that what is about to be deleted matches expected data. " + } -LineBreak + New-HTMLText -Text "Once happy with results please follow with command (this will start fixing process): " -LineBreak -FontWeight bold New-HTMLCodeBlock -Code { Remove-GPOZaurr -Type Empty, Unlinked -BackupPath "$Env:UserProfile\Desktop\GPO" -LimitProcessing 2 -Verbose } New-HTMLText -TextBlock { - "This command when executed deletes only first empty or unlinked GPOs. Use LimitProcessing parameter to prevent mass delete and increase the counter when no errors occur." + "Alternatively for multi-domain scenario, if you have limited Domain Admin credentials to a single domain please use following command: " + } + New-HTMLCodeBlock -Code { + Remove-GPOZaurr -Type Empty, Unlinked -BackupPath "$Env:UserProfile\Desktop\GPO" -LimitProcessing 2 -Verbose -IncludeDomains 'YourDomainYouHavePermissionsFor' + } + New-HTMLText -TextBlock { + "This command when executed deletes only first X empty or unlinked GPOs. Use LimitProcessing parameter to prevent mass delete and increase the counter when no errors occur." "Repeat step above as much as needed increasing LimitProcessing count till there's nothing left. In case of any issues please review and action accordingly." "Please make sure to check if backup is made as well before going all in." } New-HTMLText -Text "If there's nothing else to be deleted on SYSVOL side, we can skip to next step step" } + New-HTMLWizardStep -Name 'Remove GPOs that are DISABLED' { + New-HTMLText -Text @( + "Following command when executed removes every ", + "DISABLED" + " Group Policy. Make sure when running it for the first time to run it with ", + "WhatIf", + " parameter as shown below to prevent accidental removal.", + "Make sure to use BackupPath which will make sure that for each GPO that is about to be deleted a backup is made to folder on a desktop." + "You can skip parameters related to backup if you did backup all GPOs prior to running remove command. " + ) -FontWeight normal, bold, normal, bold, normal, bold, normal, normal -Color Black, Red, Black, Red, Black + New-HTMLText -TextBlock { + "" + } + New-HTMLCodeBlock -Code { + Remove-GPOZaurr -Type Disabled -BackupPath "$Env:UserProfile\Desktop\GPO" -Verbose -WhatIf + } + New-HTMLText -TextBlock { + "Alternatively for multi-domain scenario, if you have limited Domain Admin credentials to a single domain please use following command: " + } + New-HTMLCodeBlock -Code { + Remove-GPOZaurr -Type Disabled -BackupPath "$Env:UserProfile\Desktop\GPO" -Verbose -WhatIf -IncludeDomains 'YourDomainYouHavePermissionsFor' + } + New-HTMLText -TextBlock { + "After execution please make sure there are no errors, make sure to review provided output, and confirm that what is about to be deleted matches expected data. " + } -LineBreak + New-HTMLText -Text "Once happy with results please follow with command (this will start fixing process): " -LineBreak -FontWeight bold + New-HTMLCodeBlock -Code { + Remove-GPOZaurr -Type Disabled -BackupPath "$Env:UserProfile\Desktop\GPO" -LimitProcessing 2 -Verbose + } + New-HTMLText -TextBlock { + "Alternatively for multi-domain scenario, if you have limited Domain Admin credentials to a single domain please use following command: " + } + New-HTMLCodeBlock -Code { + Remove-GPOZaurr -Type Disabled -BackupPath "$Env:UserProfile\Desktop\GPO" -LimitProcessing 2 -Verbose -IncludeDomains 'YourDomainYouHavePermissionsFor' + } + New-HTMLText -TextBlock { + "This command when executed deletes only first X disabled GPOs. Use LimitProcessing parameter to prevent mass delete and increase the counter when no errors occur. " + "Repeat step above as much as needed increasing LimitProcessing count till there's nothing left. In case of any issues please review and action accordingly. " + "Please make sure to check if backup is made as well before going all in." + } + New-HTMLText -Text "If there's nothing else to be deleted, we can skip to next step step." + } New-HTMLWizardStep -Name 'Verification report' { New-HTMLText -TextBlock { "Once cleanup task was executed properly, we need to verify that report now shows no problems." @@ -281,5 +376,13 @@ } } } + if ($Script:Reporting['GPOList']['WarningsAndErrors']) { + New-HTMLSection -Name 'Warnings & Errors to Review' { + New-HTMLTable -DataTable $Script:Reporting['GPOList']['WarningsAndErrors'] -Filtering { + New-HTMLTableCondition -Name 'Type' -Value 'Warning' -BackgroundColor SandyBrown -ComparisonType string -Row + New-HTMLTableCondition -Name 'Type' -Value 'Error' -BackgroundColor Salmon -ComparisonType string -Row + } + } + } } } \ No newline at end of file