This commit is contained in:
Przemyslaw Klys
2020-08-26 13:22:23 +02:00
parent f50a495690
commit 8234c6cf50
+12 -1
View File
@@ -30,7 +30,18 @@
}
$Entries | Group-Object -Property Permission, SidType, Name, DomainName, PermissionType | ForEach-Object {
$Property = $_.Name -split ', '
if ($Property.Count -eq 5) {
if ($Property[0] -eq 'GpoOwner') {
[PSCustomObject] @{
Permission = $Property[0]
Type = $Property[1]
Name = $Property[2]
DomainName = $Property[3]
PermissionType = 'Allow'
GPOCount = $_.Count
GPONames = if ($Separator) { $_.Group.DisplayName -join $Separator } else { $_.Group.DisplayName }
}
} elseif ($Property.Count -eq 5) {
[PSCustomObject] @{
Permission = $Property[0]
Type = $Property[1]