mirror of
https://github.com/EvotecIT/GPOZaurr.git
synced 2026-08-09 02:09:28 +00:00
Update
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
$GPOZaurrAnalysis = [ordered] @{
|
||||
Name = 'GPO Permissions Consistency'
|
||||
Name = 'Group Policy Content'
|
||||
Enabled = $true
|
||||
Data = $null
|
||||
Execute = {
|
||||
$GPOContent = Invoke-GPOZaurrContent
|
||||
Invoke-GPOZaurrContent
|
||||
}
|
||||
Processing = {
|
||||
|
||||
@@ -15,9 +15,9 @@
|
||||
|
||||
}
|
||||
Solution = {
|
||||
foreach ($Key in $GPOContent.Keys) {
|
||||
foreach ($Key in $GPOZaurrAnalysis['Data'].Keys) {
|
||||
New-HTMLTab -Name $Key {
|
||||
New-HTMLTable -DataTable $GPOContent[$Key] -Filtering -Title $Key
|
||||
New-HTMLTable -DataTable $GPOZaurrAnalysis['Data'][$Key] -Filtering -Title $Key
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
$GPOZaurrFiles = [ordered] @{
|
||||
Name = 'GPO Permissions Consistency'
|
||||
Name = 'SYSVOL (NetLogon) Files List'
|
||||
Enabled = $true
|
||||
Data = $null
|
||||
Execute = {
|
||||
$GPOFiles = Get-GPOZaurrFiles
|
||||
}
|
||||
Get-GPOZaurrFiles
|
||||
}
|
||||
Processing = {
|
||||
|
||||
}
|
||||
@@ -15,6 +15,6 @@
|
||||
|
||||
}
|
||||
Solution = {
|
||||
New-HTMLTable -DataTable $GPOFiles -Filtering
|
||||
New-HTMLTable -DataTable $GPOZaurrFiles['Data'] -Filtering
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
$GPOZaurrOrphans = [ordered] @{
|
||||
Name = 'Orphaned GPO (SysVol or Active Directory)'
|
||||
Name = 'Orphaned Group Policies'
|
||||
Enabled = $true
|
||||
Data = $null
|
||||
Execute = {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
$GPOZaurrOwners = [ordered] @{
|
||||
Name = 'GPO Owners'
|
||||
Name = 'Group Policy Owners'
|
||||
Enabled = $true
|
||||
Data = $null
|
||||
Execute = { Get-GPOZaurrOwner -IncludeSysvol }
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
$GPOZaurrPermissions = [ordered] @{
|
||||
Name = 'GPO Permissions'
|
||||
Name = 'Group Policy Permissions'
|
||||
Enabled = $true
|
||||
Data = $null
|
||||
Execute = {
|
||||
$GPOPermissions = Get-GPOZaurrPermission -Type All -IncludePermissionType GpoEditDeleteModifySecurity, GpoEdit, GpoCustom -IncludeOwner
|
||||
|
||||
Get-GPOZaurrPermission -Type All -IncludePermissionType GpoEditDeleteModifySecurity, GpoEdit, GpoCustom #-IncludeOwner
|
||||
}
|
||||
Processing = {
|
||||
|
||||
@@ -16,6 +15,6 @@
|
||||
|
||||
}
|
||||
Solution = {
|
||||
|
||||
New-HTMLTable -DataTable $GPOZaurrPermissions['Data'] -Filtering
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
$GPOZaurrPermissionsRoot = [ordered] @{
|
||||
Name = 'GPO Permissions Consistency'
|
||||
Name = 'Group Policies Root Permissions'
|
||||
Enabled = $true
|
||||
Data = $null
|
||||
Execute = {
|
||||
$GPOPermissionsRoot = Get-GPOZaurrPermissionRoot -SkipNames
|
||||
}
|
||||
Get-GPOZaurrPermissionRoot -SkipNames
|
||||
}
|
||||
Processing = {
|
||||
|
||||
}
|
||||
@@ -15,6 +15,6 @@
|
||||
|
||||
}
|
||||
Solution = {
|
||||
New-HTMLTable -DataTable $GPOPermissionsRoot -Filtering
|
||||
New-HTMLTable -DataTable $GPOZaurrPermissionsRoot['Data'] -Filtering
|
||||
}
|
||||
}
|
||||
@@ -3,8 +3,8 @@
|
||||
Enabled = $false
|
||||
Data = $null
|
||||
Execute = {
|
||||
$ADMLegacyFiles = Get-GPOZaurrLegacyFiles
|
||||
}
|
||||
Get-GPOZaurrLegacyFiles
|
||||
}
|
||||
Processing = {
|
||||
|
||||
}
|
||||
@@ -15,6 +15,6 @@
|
||||
|
||||
}
|
||||
Solution = {
|
||||
|
||||
New-HTMLTable -DataTable $GPOZaurrSysVolLegacyFiles['Data'] -Filtering
|
||||
}
|
||||
}
|
||||
+13
-23
@@ -4,14 +4,6 @@
|
||||
param(
|
||||
[string] $FilePath,
|
||||
[string[]] $Type
|
||||
<#
|
||||
[ValidateSet(
|
||||
'GPOList', 'GPOOrphans', 'GPOPermissions', 'GPOPermissionsRoot', 'GPOFiles',
|
||||
'GPOConsistency', 'GPOOwners', 'GPOAnalysis',
|
||||
'NetLogon',
|
||||
'LegacyAdm'
|
||||
)][string[]] $Type
|
||||
#>
|
||||
)
|
||||
Reset-GPOZaurrStatus # This makes sure types are at it's proper status
|
||||
|
||||
@@ -53,12 +45,14 @@
|
||||
}
|
||||
|
||||
# Lets disable all current ones
|
||||
foreach ($T in $Script:GPOConfiguration.Keys) {
|
||||
$Script:GPOConfiguration[$T].Enabled = $false
|
||||
}
|
||||
# Lets enable all requested ones
|
||||
foreach ($T in $Type) {
|
||||
$Script:GPOConfiguration[$T].Enabled = $true
|
||||
if ($Type) {
|
||||
foreach ($T in $Script:GPOConfiguration.Keys) {
|
||||
$Script:GPOConfiguration[$T].Enabled = $false
|
||||
}
|
||||
# Lets enable all requested ones
|
||||
foreach ($T in $Type) {
|
||||
$Script:GPOConfiguration[$T].Enabled = $true
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($T in $Script:GPOConfiguration.Keys) {
|
||||
@@ -75,7 +69,7 @@
|
||||
|
||||
# Generate pretty HTML
|
||||
Write-Verbose "Invoke-GPOZaurr - Generating HTML"
|
||||
New-HTML {
|
||||
New-HTML -Author 'Przemysław Kłys' -TitleText 'GPOZaurr Report' {
|
||||
New-HTMLTabStyle -BorderRadius 0px -TextTransform capitalize -BackgroundColorActive SlateGrey
|
||||
New-HTMLSectionStyle -BorderRadius 0px -HeaderBackGroundColor Grey -RemoveShadow
|
||||
New-HTMLPanelStyle -BorderRadius 0px
|
||||
@@ -87,7 +81,7 @@
|
||||
New-HTMLText -Text "Report generated on $(Get-Date)" -Color Blue
|
||||
} -JustifyContent flex-start -Invisible
|
||||
New-HTMLSection {
|
||||
New-HTMLText -Text $Script:Reporting['Version'] -Color Blue
|
||||
New-HTMLText -Text "GPOZaurr - $($Script:Reporting['Version'])" -Color Blue
|
||||
} -JustifyContent flex-end -Invisible
|
||||
}
|
||||
}
|
||||
@@ -95,18 +89,14 @@
|
||||
if ($Type.Count -eq 1) {
|
||||
foreach ($T in $Script:GPOConfiguration.Keys) {
|
||||
if ($Script:GPOConfiguration[$T].Enabled -eq $true) {
|
||||
if ($Script:GPOConfiguration[$T]['Data']) {
|
||||
& $Script:GPOConfiguration[$T]['Solution']
|
||||
}
|
||||
& $Script:GPOConfiguration[$T]['Solution']
|
||||
}
|
||||
}
|
||||
} else {
|
||||
foreach ($T in $Script:GPOConfiguration.Keys) {
|
||||
if ($Script:GPOConfiguration[$T].Enabled -eq $true) {
|
||||
New-HTMLTab -Name $T {
|
||||
if ($Script:GPOConfiguration[$T]['Data']) {
|
||||
& $Script:GPOConfiguration[$T]['Solution']
|
||||
}
|
||||
New-HTMLTab -Name $Script:GPOConfiguration[$T]['Name'] {
|
||||
& $Script:GPOConfiguration[$T]['Solution']
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user