This commit is contained in:
Przemyslaw Klys
2020-11-06 13:08:38 +01:00
parent 64bc1ff092
commit d27760931e
6 changed files with 22 additions and 8 deletions
+1 -1
View File
@@ -42,7 +42,7 @@
}
$GPOZaurrList['Variables']['GPOTotal'] = $GPOZaurrList['Data'].Count
}
Variables = [ordered] @{
Variables = @{
GPONotLinked = 0
GPOLinked = 0
GPOEmpty = 0
@@ -36,7 +36,7 @@
$GPOZaurrNetLogonPermissions['Action'] = $false
}
}
Variables = @{
Variables = @{
NetLogonOwners = 0
NetLogonOwnersAdministrators = 0
NetLogonOwnersNotAdministrative = 0
+8 -3
View File
@@ -1,4 +1,4 @@
$GPOZaurrOwners = [ordered] @{
$GPOZaurrOwners = [PSCustomObject] @{
Name = 'Group Policy Owners'
Enabled = $true
Action = $null
@@ -24,8 +24,13 @@
$GpoZaurrOwners['Variables']['WillNotTouch']++
}
}
if ($GpoZaurrOwners['Variables']['WillFix'].Count -gt 0) {
$GpoZaurrOwners['Action'] = $true
} else {
$GpoZaurrOwners['Action'] = $false
}
}
Variables = [ordered] @{
Variables = @{
IsAdministrative = 0
IsNotAdministrative = 0
IsConsistent = 0
@@ -52,7 +57,7 @@
} -Title 'Group Policy Owners' -TitleAlignment center
}
}
Summary = {
Summary = {
New-HTMLText -FontSize 10pt -TextBlock {
"By default GPO creation is usually maintained by Domain Admins or Enterprise Admins. "
"When GPO is created by member of Domain Admins or Enterprise Admins group the GPO Owner is set to Domain Admins. "
+1 -1
View File
@@ -9,7 +9,7 @@
Processing = {
}
Variables = @{
Variables = @{
}
Overview = {
+5
View File
@@ -2,6 +2,11 @@
param(
)
if (-not $Script:GPOConfigurationClean) {
# $Script:GPOConfigurationClean = Copy-Dictionary -Dictionary $Script:GPOConfiguration
} else {
# $Script:GPOConfiguration = Copy-Dictionary -Dictionary $Script:GPOConfigurationClean
}
if (-not $Script:DefaultTypes) {
$Script:DefaultTypes = foreach ($T in $Script:GPOConfiguration.Keys) {
if ($Script:GPOConfiguration[$T].Enabled) {
+6 -2
View File
@@ -7,6 +7,7 @@
[switch] $PassThru,
[switch] $HideHTML
)
$Script:GPOConfigurationClean = Copy-Dictionary -Dictionary $Script:GPOConfiguration
Reset-GPOZaurrStatus # This makes sure types are at it's proper status
$Script:Reporting = [ordered] @{}
@@ -70,7 +71,8 @@
}
# Generate pretty HTML
Write-Verbose "Invoke-GPOZaurr - Generating HTML"
$TimeLogHTML = Start-TimeLog
Write-Color -Text '[i]', '[HTML ] ', 'Generating HTML report' -Color Yellow, DarkGray, Yellow
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
@@ -104,12 +106,14 @@
}
}
} -Online -ShowHTML:(-not $HideHTML) -FilePath $FilePath
$TimeLogEndHTML = Stop-TimeLog -Time $TimeLogHTML -Option OneLiner
Write-Color -Text '[i]', '[HTML ] ', 'Generating HTML report', " [Time to execute: $TimeLogEndHTML]" -Color Yellow, DarkGray, Yellow, DarkGray
if ($PassThru) {
$OutputData = Export-GPOZaurr
$OutputData
}
Reset-GPOZaurrStatus # This makes sure types are at it's proper status
$Script:GPOConfiguration = Copy-Dictionary -Dictionary $Script:GPOConfigurationClean
}
[scriptblock] $SourcesAutoCompleter = {