From ba5a7e1549faa1f2a88dc57b8fe08141ef16def1 Mon Sep 17 00:00:00 2001 From: Przemyslaw Klys Date: Thu, 1 Oct 2020 21:35:00 +0200 Subject: [PATCH] Update --- Examples/Example-08-ListingPermissionsAdministrative.ps1 | 2 +- Examples/Example-08-ListingPermissionsUnknown.ps1 | 2 +- Examples/Example-11-ReplaceGPOOwnerAutomated.ps1 | 6 +++--- Examples/Example-29-FindGPO1.ps1 | 7 ++++--- Examples/Example-37-GPOPermissionSummary.ps1 | 9 ++++++++- ...ssionSummary.ps1 => Example-38-GPOPermissionRoot.ps1} | 2 +- 6 files changed, 18 insertions(+), 10 deletions(-) rename Examples/{Example-38-GPOPermissionSummary.ps1 => Example-38-GPOPermissionRoot.ps1} (52%) diff --git a/Examples/Example-08-ListingPermissionsAdministrative.ps1 b/Examples/Example-08-ListingPermissionsAdministrative.ps1 index 64d66ca..0e29677 100644 --- a/Examples/Example-08-ListingPermissionsAdministrative.ps1 +++ b/Examples/Example-08-ListingPermissionsAdministrative.ps1 @@ -1,4 +1,4 @@ Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force -$T = Get-GPOZaurrPermission -GPOName 'Default Domain Policy' -Type 'All' +$T = Get-GPOZaurrPermission -GPOName 'Default Domain Policy' -Type 'All' -IncludeOwner $T | Format-Table * \ No newline at end of file diff --git a/Examples/Example-08-ListingPermissionsUnknown.ps1 b/Examples/Example-08-ListingPermissionsUnknown.ps1 index 5bd2471..a144f20 100644 --- a/Examples/Example-08-ListingPermissionsUnknown.ps1 +++ b/Examples/Example-08-ListingPermissionsUnknown.ps1 @@ -1,4 +1,4 @@ Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force $T = Get-GPOZaurrPermission -Type Unknown -Verbose -$T | Format-Table * \ No newline at end of file +$T | Out-HtmlView -ScrollX -Filtering -DisablePaging -ScrollY -Online \ No newline at end of file diff --git a/Examples/Example-11-ReplaceGPOOwnerAutomated.ps1 b/Examples/Example-11-ReplaceGPOOwnerAutomated.ps1 index 9298153..eaf6c5e 100644 --- a/Examples/Example-11-ReplaceGPOOwnerAutomated.ps1 +++ b/Examples/Example-11-ReplaceGPOOwnerAutomated.ps1 @@ -1,14 +1,14 @@ Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force -# This Example shows how to deal with GPOs that have owner that doesn't exists anymore (deleted userr or diff domain) - EmptyOrUnknown +# This Example shows how to deal with GPOs that have owner that doesn't exists anymore (deleted userr or diff domain) - Unknown # And also can fix at the same time NotAdministrative - this basically looks for users/groups that are not Domain Admins or Enterprise Admins # regardless if current user is still Domain Admin or not $GPOs = Get-GPOZaurrOwner -IncludeSysvol #-GPOName -$GPOs | Format-Table DisplayName, Owner, OwnerSID, OwnerType, SysvolOwner, SysvolSID, SysvolType +$GPOs | Format-Table DisplayName, Owner, OwnerSID, OwnerType, SysvolOwner, SysvolSID, SysvolType #Set-GPOZaurrOwner -Type Unknown -Verbose #-LimitProcessing 2 -WhatIf -Set-GPOZaurrOwner -Type NotAdministrative -Verbose -LimitProcessing 2 -WhatIf +Set-GPOZaurrOwner -Type NotAdministrative -Verbose -LimitProcessing 2 -WhatIf #Set-GPOZaurrOwner -Type NotMatching -Verbose -LimitProcessing 2 -WhatIf #Set-GPOZaurrOwner -GPOName 'COMPUTERS | Enable Sets' -Verbose -Principal 'przemyslaw.klys' -WhatIf #-SkipSysvol diff --git a/Examples/Example-29-FindGPO1.ps1 b/Examples/Example-29-FindGPO1.ps1 index 3999225..0ee779f 100644 --- a/Examples/Example-29-FindGPO1.ps1 +++ b/Examples/Example-29-FindGPO1.ps1 @@ -1,8 +1,9 @@ Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force -$Output = Invoke-GPOZaurr -GPOPath 'C:\Support\GitHub\GpoZaurr\Ignore\GPODefender' -#$Output = Invoke-GPOZaurr -GPOPath 'C:\Support\GitHub\GpoZaurr\Ignore\GPOExport' - +#$Output = Invoke-GPOZaurr -GPOPath 'C:\Support\GitHub\GpoZaurr\Ignore\GPODefender' +$Output = Invoke-GPOZaurr -GPOPath 'C:\Support\GitHub\GpoZaurr\Ignore\GPOExport' +$Output +return $Output | Format-Table $Output.Reports | Format-Table $Output.Reports.WindowsDefenderExploitGuard diff --git a/Examples/Example-37-GPOPermissionSummary.ps1 b/Examples/Example-37-GPOPermissionSummary.ps1 index f266075..06cc259 100644 --- a/Examples/Example-37-GPOPermissionSummary.ps1 +++ b/Examples/Example-37-GPOPermissionSummary.ps1 @@ -1,4 +1,11 @@ Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force -$SummaryPermission = Get-GPOZaurrPermissionSummary -IncludePermissionType GpoEdit, GpoEditDeleteModifySecurity -IncludeOwner +# Default Permissions: +# 'GpoApply', 'GpoEdit', 'GPOCustom', 'GpoEditDeleteModifySecurity', 'GPORead' +# 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' $SummaryPermission | Sort-Object -Property Permission | Format-Table \ No newline at end of file diff --git a/Examples/Example-38-GPOPermissionSummary.ps1 b/Examples/Example-38-GPOPermissionRoot.ps1 similarity index 52% rename from Examples/Example-38-GPOPermissionSummary.ps1 rename to Examples/Example-38-GPOPermissionRoot.ps1 index 29a3ce9..f8bf680 100644 --- a/Examples/Example-38-GPOPermissionSummary.ps1 +++ b/Examples/Example-38-GPOPermissionRoot.ps1 @@ -1,3 +1,3 @@ Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force -Get-GPOZaurrPermissionRoot | Format-Table \ No newline at end of file +Get-GPOZaurrPermissionRoot -Verbose | Format-Table * \ No newline at end of file