mirror of
https://github.com/EvotecIT/GPOZaurr.git
synced 2026-08-31 12:47:59 +00:00
Update
This commit is contained in:
@@ -56,20 +56,27 @@
|
||||
}
|
||||
$SysVolpath = -join ('\\', $Domain, '\sysvol\', $Domain, '\Policies\{', $_.ID.GUID, '}')
|
||||
if ($VerifyInheritance) {
|
||||
$FolderPermissions = Get-WinADSharePermission -Path $SysVolpath -Verbose:$false
|
||||
if ($FolderPermissions) {
|
||||
[Array] $NotInheritedPermissions = foreach ($File in $FolderPermissions) {
|
||||
if ($File.Path -ne $SysVolpath -and $File.IsInherited -eq $false) {
|
||||
$File
|
||||
if ($IsConsistent -eq $true) {
|
||||
$FolderPermissions = Get-WinADSharePermission -Path $SysVolpath -Verbose:$false
|
||||
if ($FolderPermissions) {
|
||||
[Array] $NotInheritedPermissions = foreach ($File in $FolderPermissions) {
|
||||
if ($File.Path -ne $SysVolpath -and $File.IsInherited -eq $false) {
|
||||
$File
|
||||
}
|
||||
}
|
||||
if ($NotInheritedPermissions.Count -eq 0) {
|
||||
$ACLConsistentInside = $true
|
||||
} else {
|
||||
$ACLConsistentInside = $false
|
||||
}
|
||||
}
|
||||
if ($NotInheritedPermissions.Count -eq 0) {
|
||||
$ACLConsistentInside = $true
|
||||
} else {
|
||||
$ACLConsistentInside = $false
|
||||
$ACLConsistentInside = 'Not available'
|
||||
$NotInheritedPermissions = $null
|
||||
}
|
||||
} else {
|
||||
$ACLConsistentInside = 'Not available'
|
||||
# Since top level permissions are inconsistent we don't even try to asses inside permissions
|
||||
$ACLConsistentInside = $IsConsistent
|
||||
$NotInheritedPermissions = $null
|
||||
}
|
||||
}
|
||||
$Object = [ordered] @{
|
||||
|
||||
Reference in New Issue
Block a user