mirror of
https://github.com/EvotecIT/GPOZaurr.git
synced 2026-07-26 20:00:09 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3821a38b32 | |||
| 7fbb65107c |
@@ -10,7 +10,7 @@
|
||||
#Get-GPOZaurrPermissions | Format-Table -AutoSize
|
||||
$T = Get-GPOZaurrPermissions #| Out-HtmlView
|
||||
#$T[0] | Format-List *
|
||||
$T | Format-Table -AutoSize
|
||||
$T | Format-Table -AutoSize *
|
||||
#$T[0].Trustee
|
||||
#$T[0].Permission
|
||||
#$T[0]
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
Description = 'Group Policy Eater'
|
||||
FunctionsToExport = 'Backup-GPOZaurr', 'Get-GPOZaurr', 'Get-GPOZaurrBackupInformation', 'Get-GPOZaurrPassword', 'Get-GPOZaurrPermissions', 'Get-GPOZaurrWMI', 'New-GPOZaurrWMI', 'Remove-GPOZaurr', 'Remove-GPOZaurrWMI', 'Restore-GPOZaurr', 'Save-GPOZaurrFiles'
|
||||
GUID = 'f7d4c9e4-0298-4f51-ad77-e8e3febebbde'
|
||||
ModuleVersion = '0.0.6'
|
||||
ModuleVersion = '0.0.9'
|
||||
PowerShellVersion = '5.1'
|
||||
PrivateData = @{
|
||||
PSData = @{
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
ComputerVersion : AD Version: 1, SysVol Version: 1
|
||||
WmiFilter :
|
||||
#>
|
||||
Get-GPPermission -Name $GPO.DisplayName -DomainName $GPO.DomainName -All -Server $QueryServer | ForEach-Object -Process {
|
||||
Get-GPPermissions -Guid $GPO.ID -DomainName $GPO.DomainName -All -Server $QueryServer | ForEach-Object -Process {
|
||||
$GPOPermission = $_
|
||||
#$GPOPermissionFormatted = ConvertTo-TableFormat -InputObject $_
|
||||
[PSCustomObject] @{
|
||||
@@ -49,7 +49,15 @@
|
||||
SidType = $GPOPermission.Trustee.SidType #: Group
|
||||
}
|
||||
}
|
||||
$SplittedOwner = $GPO.Owner.Split('\')
|
||||
|
||||
if ($GPO.Owner) {
|
||||
$SplittedOwner = $GPO.Owner.Split('\')
|
||||
$DomainOwner = $SplittedOwner[0] #: EVOTEC
|
||||
$DomainUserName = $SplittedOwner[1] #: Domain Admins
|
||||
} else {
|
||||
$DomainOwner = $GPO.Owner
|
||||
$DomainUserName = ''
|
||||
}
|
||||
[PSCustomObject] @{
|
||||
DisplayName = $GPO.DisplayName # : ALL | Enable RDP
|
||||
GUID = $GPO.GUID
|
||||
@@ -64,9 +72,9 @@
|
||||
|
||||
Permission = 'Owner' # : GpoEditDeleteModifySecurity
|
||||
Inherited = $false # : False
|
||||
Domain = $SplittedOwner[0] #: EVOTEC
|
||||
Domain = $DomainOwner
|
||||
DistinguishedName = '' #: CN = Domain Admins, CN = Users, DC = ad, DC = evotec, DC = xyz
|
||||
Name = $SplittedOwner[1] #: Domain Admins
|
||||
Name = $DomainUserName
|
||||
Sid = '' #: S - 1 - 5 - 21 - 853615985 - 2870445339 - 3163598659 - 512
|
||||
SidType = '' #: Group
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user