mirror of
https://github.com/EvotecIT/GPOZaurr.git
synced 2026-08-07 17:33:14 +00:00
Update
This commit is contained in:
@@ -1,13 +1,11 @@
|
||||
$GPOZaurrNetLogonPermissions = [ordered] @{
|
||||
Name = 'NetLogon Permissions'
|
||||
Enabled = $true
|
||||
Data = $null
|
||||
DataOwner = [System.Collections.Generic.List[PSCustomObject]]::new()
|
||||
DataNonOwner = [System.Collections.Generic.List[PSCustomObject]]::new()
|
||||
Execute = {
|
||||
Name = 'NetLogon Permissions'
|
||||
Enabled = $true
|
||||
Data = $null
|
||||
Execute = {
|
||||
Get-GPOZaurrNetLogon
|
||||
}
|
||||
Processing = {
|
||||
Processing = {
|
||||
foreach ($File in $GPOZaurrNetLogonPermissions['Data']) {
|
||||
if ($File.FileSystemRights -eq 'Owner') {
|
||||
$GPOZaurrNetLogonPermissions['Variables']['NetLogonOwners']++
|
||||
@@ -26,21 +24,23 @@
|
||||
} else {
|
||||
$GPOZaurrNetLogonPermissions['Variables']['NetLogonOwnersToFix']++
|
||||
}
|
||||
$GPOZaurrNetLogonPermissions['DataOwner'].Add($File)
|
||||
$GPOZaurrNetLogonPermissions['Variables']['Owner'].Add($File)
|
||||
} else {
|
||||
$GPOZaurrNetLogonPermissions['DataNonOwner'].Add($File)
|
||||
$GPOZaurrNetLogonPermissions['Variables']['NonOwner'].Add($File)
|
||||
}
|
||||
}
|
||||
}
|
||||
Variables = @{
|
||||
Variables = @{
|
||||
NetLogonOwners = 0
|
||||
NetLogonOwnersAdministrators = 0
|
||||
NetLogonOwnersNotAdministrative = 0
|
||||
NetLogonOwnersAdministrative = 0
|
||||
NetLogonOwnersAdministrativeNotAdministrators = 0
|
||||
NetLogonOwnersToFix = 0
|
||||
Owner = [System.Collections.Generic.List[PSCustomObject]]::new()
|
||||
NonOwner = [System.Collections.Generic.List[PSCustomObject]]::new()
|
||||
}
|
||||
Overview = {
|
||||
Overview = {
|
||||
New-HTMLPanel {
|
||||
New-HTMLText -Text 'Following chart presents ', 'NetLogon Summary' -FontSize 10pt -FontWeight normal, bold
|
||||
New-HTMLList -Type Unordered {
|
||||
@@ -63,7 +63,7 @@
|
||||
|
||||
}
|
||||
}
|
||||
Solution = {
|
||||
Solution = {
|
||||
New-HTMLTab -Name 'NetLogon Owners' {
|
||||
New-HTMLSection -Invisible {
|
||||
New-HTMLPanel {
|
||||
@@ -92,7 +92,7 @@
|
||||
}
|
||||
}
|
||||
New-HTMLSection -Name 'NetLogon Files List' {
|
||||
New-HTMLTable -DataTable $GPOZaurrNetLogonPermissions['DataOwner'] -Filtering {
|
||||
New-HTMLTable -DataTable $GPOZaurrNetLogonPermissions['Variables']['Owner'] -Filtering {
|
||||
New-HTMLTableCondition -Name 'PrincipalSid' -Value "S-1-5-32-544" -BackgroundColor LightGreen -ComparisonType string
|
||||
New-HTMLTableCondition -Name 'PrincipalSid' -Value "S-1-5-32-544" -BackgroundColor Salmon -ComparisonType string -Operator ne
|
||||
New-HTMLTableCondition -Name 'PrincipalType' -Value "WellKnownAdministrative" -BackgroundColor LightGreen -ComparisonType string -Operator eq
|
||||
@@ -161,7 +161,7 @@
|
||||
}
|
||||
New-HTMLTab -Name 'NetLogon Permissions' {
|
||||
New-HTMLSection -Name 'NetLogon Files List' {
|
||||
New-HTMLTable -DataTable $GPOZaurrNetLogonPermissions['DataNonOwner'] -Filtering
|
||||
New-HTMLTable -DataTable $GPOZaurrNetLogonPermissions['Variables']['NonOwner'] -Filtering
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
$Script:GPOConfiguration = @{
|
||||
GPOConsistency = $GPOZaurrConsistency
|
||||
GPOOwners = $GPOZaurrOwners
|
||||
GPOList = $GPOZaurrList
|
||||
$Script:GPOConfiguration = [ordered] @{
|
||||
GPOOrphans = $GPOZaurrOrphans
|
||||
GPOOwners = $GPOZaurrOwners
|
||||
GPOConsistency = $GPOZaurrConsistency
|
||||
GPOList = $GPOZaurrList
|
||||
GPOPermissions = $GPOZaurrPermissions
|
||||
GPOPermissionsRoot = $GPOZaurrPermissionsRoot
|
||||
GPOFiles = $GPOZaurrFiles
|
||||
|
||||
@@ -24,15 +24,33 @@
|
||||
$LatestVersion = $GitHubReleases[0]
|
||||
if (-not $LatestVersion.Errors) {
|
||||
if ($GPOZaurrVersion.Version -eq $LatestVersion.Version) {
|
||||
$Script:Reporting['Version'] = "GPOZaurr Current/Latest: $($LatestVersion.Version) at $($LatestVersion.PublishDate)"
|
||||
$Script:Reporting['Version'] = "Current/Latest: $($LatestVersion.Version) at $($LatestVersion.PublishDate)"
|
||||
} elseif ($GPOZaurrVersion.Version -lt $LatestVersion.Version) {
|
||||
$Script:Reporting['Version'] = "GPOZaurr Current: $($GPOZaurrVersion.Version), Published: $($LatestVersion.Version) at $($LatestVersion.PublishDate). Update?"
|
||||
$Script:Reporting['Version'] = "Current: $($GPOZaurrVersion.Version), Published: $($LatestVersion.Version) at $($LatestVersion.PublishDate). Update?"
|
||||
} elseif ($GPOZaurrVersion.Version -gt $LatestVersion.Version) {
|
||||
$Script:Reporting['Version'] = "GPOZaurr Current: $($GPOZaurrVersion.Version), Published: $($LatestVersion.Version) at $($LatestVersion.PublishDate). Lucky you!"
|
||||
$Script:Reporting['Version'] = "Current: $($GPOZaurrVersion.Version), Published: $($LatestVersion.Version) at $($LatestVersion.PublishDate). Lucky you!"
|
||||
}
|
||||
} else {
|
||||
$Script:Reporting['Version'] = "GPOZaurr Current: $($GPOZaurrVersion.Version)"
|
||||
}
|
||||
Write-Color '[i]', "[GPOZaurr] ", 'Version', ' [Informative] ', $Script:Reporting['Version'] -Color Yellow, DarkGray, Yellow, DarkGray, Magenta
|
||||
|
||||
$Supported = [System.Collections.Generic.List[string]]::new()
|
||||
[Array] $NotSupported = foreach ($T in $Type) {
|
||||
if ($T -notin $Script:GPOConfiguration.Keys ) {
|
||||
$T
|
||||
} else {
|
||||
$Supported.Add($T)
|
||||
}
|
||||
}
|
||||
if ($Supported) {
|
||||
Write-Color '[i]', "[GPOZaurr] ", 'Supported types', ' [Informative] ', "Chosen by user: ", ($Supported -join ', ') -Color Yellow, DarkGray, Yellow, DarkGray, Yellow, Magenta
|
||||
}
|
||||
if ($NotSupported) {
|
||||
Write-Color '[i]', "[GPOZaurr] ", 'Not supported types', ' [Informative] ', "Following types are not supported: ", ($NotSupported -join ', ') -Color Yellow, DarkGray, Yellow, DarkGray, Yellow, Magenta
|
||||
Write-Color '[i]', "[GPOZaurr] ", 'Not supported types', ' [Informative] ', "Please use one/multiple from the list: ", ($Script:GPOConfiguration.Keys -join ', ') -Color Yellow, DarkGray, Yellow, DarkGray, Yellow, Magenta
|
||||
return
|
||||
}
|
||||
|
||||
# Lets disable all current ones
|
||||
foreach ($T in $Script:GPOConfiguration.Keys) {
|
||||
|
||||
Reference in New Issue
Block a user