mirror of
https://github.com/EvotecIT/GPOZaurr.git
synced 2026-08-20 07:02:22 +00:00
Update
This commit is contained in:
@@ -5,7 +5,6 @@
|
||||
# If you want to see also owners
|
||||
# 'GpoOwner'
|
||||
# If you want to include Root Level Permissions
|
||||
# 'GpoCustomCreate', 'GpoCustomOwner'
|
||||
|
||||
$SummaryPermission = Get-GPOZaurrPermissionSummary -IncludePermissionType 'GPOCustom', 'GpoEdit', 'GpoEditDeleteModifySecurity', 'GpoOwner', 'GpoCustomCreate', 'GpoCustomOwner'
|
||||
# 'GpoRootCreate', 'GpoRootOwner'
|
||||
$SummaryPermission = Get-GPOZaurrPermissionSummary -IncludePermissionType 'GpoCustom', 'GpoEdit', 'GpoEditDeleteModifySecurity', 'GpoOwner', 'GpoRootCreate', 'GpoRootOwner'
|
||||
$SummaryPermission | Sort-Object -Property Permission | Format-Table
|
||||
@@ -1,8 +1,8 @@
|
||||
function Get-GPOZaurrPermissionRoot {
|
||||
[cmdletBinding()]
|
||||
param(
|
||||
[ValidateSet('GpoCustomCreate', 'GpoCustomOwner')][string[]] $IncludePermissionType,
|
||||
[ValidateSet('GpoCustomCreate', 'GpoCustomOwner')][string[]] $ExcludePermissionType,
|
||||
[ValidateSet('GpoRootCreate', 'GpoRootOwner')][string[]] $IncludePermissionType,
|
||||
[ValidateSet('GpoRootCreate', 'GpoRootOwner')][string[]] $ExcludePermissionType,
|
||||
[alias('ForestName')][string] $Forest,
|
||||
[string[]] $ExcludeDomains,
|
||||
[alias('Domain', 'Domains')][string[]] $IncludeDomains,
|
||||
@@ -29,10 +29,10 @@
|
||||
foreach ($Permission in $GPOPermissionsGlobal) {
|
||||
$CustomPermission = foreach ($_ in $Permission.ActiveDirectoryRights) {
|
||||
if ($_ -in 'WriteDACL', 'WriteOwner', 'GenericAll' ) {
|
||||
'GpoCustomOwner'
|
||||
'GpoRootOwner'
|
||||
}
|
||||
if ($_ -in 'CreateChild', 'GenericAll') {
|
||||
'GpoCustomCreate'
|
||||
'GpoRootCreate'
|
||||
}
|
||||
}
|
||||
$CustomPermission = $CustomPermission | Sort-Object -Unique
|
||||
|
||||
@@ -3,9 +3,8 @@
|
||||
param(
|
||||
[validateSet('AuthenticatedUsers', 'DomainComputers', 'Unknown', 'WellKnownAdministrative', 'NotWellKnown', 'NotWellKnownAdministrative', 'NotAdministrative', 'Administrative', 'All')][string[]] $Type = 'All',
|
||||
[validateSet('Allow', 'Deny', 'All')][string] $PermitType = 'All',
|
||||
[ValidateSet('GpoApply', 'GpoEdit', 'GpoCustom', 'GpoEditDeleteModifySecurity', 'GpoRead', 'GpoOwner', 'GpoCustomCreate', 'GpoCustomOwner')][string[]] $IncludePermissionType,
|
||||
[ValidateSet('GpoApply', 'GpoEdit', 'GpoCustom', 'GpoEditDeleteModifySecurity', 'GpoRead', 'GpoOwner', 'GpoCustomCreate', 'GpoCustomOwner')][string[]] $ExcludePermissionType,
|
||||
|
||||
[ValidateSet('GpoApply', 'GpoEdit', 'GpoCustom', 'GpoEditDeleteModifySecurity', 'GpoRead', 'GpoOwner', 'GpoRootCreate', 'GpoRootOwner')][string[]] $IncludePermissionType,
|
||||
[ValidateSet('GpoApply', 'GpoEdit', 'GpoCustom', 'GpoEditDeleteModifySecurity', 'GpoRead', 'GpoOwner', 'GpoRootCreate', 'GpoRootOwner')][string[]] $ExcludePermissionType,
|
||||
[alias('ForestName')][string] $Forest,
|
||||
[string[]] $ExcludeDomains,
|
||||
[alias('Domain', 'Domains')][string[]] $IncludeDomains,
|
||||
@@ -22,7 +21,7 @@
|
||||
$IncludePermTypes.Add([Microsoft.GroupPolicy.GPPermissionType]::$PermType)
|
||||
} elseif ($PermType -in 'GpoOwner') {
|
||||
$IncludeOwner = $true
|
||||
} elseif ($PermType -in 'GpoCustomCreate', 'GpoCustomOwner') {
|
||||
} elseif ($PermType -in 'GpoRootCreate', 'GpoRootOwner') {
|
||||
$CustomPermissions.Add($PermType)
|
||||
}
|
||||
}
|
||||
@@ -31,7 +30,7 @@
|
||||
$ExcludePermTypes.Add([Microsoft.GroupPolicy.GPPermissionType]::$PermType)
|
||||
} elseif ($PermType -in 'GpoOwner') {
|
||||
$IncludeOwner = $false
|
||||
} elseif ($PermType -in 'GpoCustomCreate', 'GpoCustomOwner') {
|
||||
} elseif ($PermType -in 'GpoRootCreate', 'GpoRootOwner') {
|
||||
$CustomPermissions.Add($PermType)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user