Improved GPOZaurr

This commit is contained in:
Przemyslaw Klys
2020-12-28 12:06:40 +01:00
parent 015afd69a4
commit c10a4c088e
4 changed files with 33 additions and 1 deletions
+2
View File
@@ -60,6 +60,8 @@
$Output['ModificationTime'] = $GPOCache[$Search].ModificationTime
$Output['GPODomainDistinguishedName'] = ConvertFrom-DistinguishedName -DistinguishedName $DN -ToDC
$Output['GPODistinguishedName'] = $DN
# This is object name, usually used for sites
$Output['Name'] = $Object.Name
[PSCustomObject] $Output
} else {
Write-Warning "Get-PrivGPOZaurrLink - Couldn't find link $Search in a GPO Cache. Lack of permissions for given GPO? Are you running as admin? Skipping."
+29
View File
@@ -0,0 +1,29 @@
$GPOZaurrLinks = [ordered] @{
Name = 'Group Policy Links'
Enabled = $true
ActionRequired = $null
Data = $null
Execute = {
Get-GPOZaurrLink -Forest $Forest -IncludeDomains $IncludeDomains -ExcludeDomains $ExcludeDomains -Summary
}
Processing = {
}
Variables = @{
}
Overview = {
}
Solution = {
New-HTMLTable -DataTable $Script:Reporting['GPOLinks']['Data'] -Filtering
if ($Script:Reporting['GPOLinks']['WarningsAndErrors']) {
New-HTMLSection -Name 'Warnings & Errors to Review' {
New-HTMLTable -DataTable $Script:Reporting['GPOLinks']['WarningsAndErrors'] -Filtering {
New-HTMLTableCondition -Name 'Type' -Value 'Warning' -BackgroundColor SandyBrown -ComparisonType string -Row
New-HTMLTableCondition -Name 'Type' -Value 'Error' -BackgroundColor Salmon -ComparisonType string -Row
}
}
}
}
}
+1
View File
@@ -4,6 +4,7 @@
GPOConsistency = $GPOZaurrConsistency
GPODuplicates = $GPOZaurrDuplicates
GPOList = $GPOZaurrList
GPOLinks = $GPOZaurrLinks
GPOPassword = $GPOZaurrPassword
GPOPermissions = $GPOZaurrPermissionsAnalysis
GPOPermissionsAdministrative = $GPOZaurrPermissionsAdministrative
+1 -1
View File
@@ -120,7 +120,7 @@
$LinkedRootPlaces.Add($InternalLink.DistinguishedName)
} elseif ($InternalLink.ObjectClass -eq 'site') {
$LinkedSite = $true
$LinkedSitePlaces.Add($InternalLink.DistinguishedName)
$LinkedSitePlaces.Add($InternalLink.Name)
} else {
$LinkedOU = $true
}