From 8de9c32fd12f4dc10aab8c8f2fe989085e2740a0 Mon Sep 17 00:00:00 2001 From: Przemyslaw Klys Date: Fri, 19 Jun 2020 19:17:20 +0200 Subject: [PATCH] Updae examples --- Examples/Example-16-AddRemoveGPOPermission03.ps1 | 8 -------- Examples/Example-16-AddRemoveGPOPermission04.ps1 | 2 +- Examples/Example-16-KeepPermissions.ps1 | 4 ++-- 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/Examples/Example-16-AddRemoveGPOPermission03.ps1 b/Examples/Example-16-AddRemoveGPOPermission03.ps1 index 0f0d6f6..472f27b 100644 --- a/Examples/Example-16-AddRemoveGPOPermission03.ps1 +++ b/Examples/Example-16-AddRemoveGPOPermission03.ps1 @@ -1,14 +1,6 @@ #Clear-Host Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force -$ApprovedGroups = @( - 'GDS-TestGroup10' -) -$RootGroups = @( - #'przemyslaw.klys' -) - - Invoke-GPOZaurrPermission -Linked Root -Verbose { Set-GPOOwner -Type Administrative #Set-GPOOwner -Principal 'EVOTEC\Enterprise Admins' diff --git a/Examples/Example-16-AddRemoveGPOPermission04.ps1 b/Examples/Example-16-AddRemoveGPOPermission04.ps1 index e05229a..5d1bece 100644 --- a/Examples/Example-16-AddRemoveGPOPermission04.ps1 +++ b/Examples/Example-16-AddRemoveGPOPermission04.ps1 @@ -8,4 +8,4 @@ Invoke-GPOZaurrPermission -Verbose -SearchBase 'OU=Computers,OU=Production,DC=ad Remove-GPOPermission -Type NotAdministrative, NotWellKnownAdministrative -IncludePermissionType GpoEdit, GpoEditDeleteModifySecurity #Add-GPOPermission -Type Administrative -IncludePermissionType GpoEditDeleteModifySecurity #Add-GPOPermission -Type WellKnownAdministrative -IncludePermissionType GpoEditDeleteModifySecurity -} #-WhatIf #| Format-Table * \ No newline at end of file +} -WhatIf #| Format-Table * \ No newline at end of file diff --git a/Examples/Example-16-KeepPermissions.ps1 b/Examples/Example-16-KeepPermissions.ps1 index 5afb7f8..845ef0e 100644 --- a/Examples/Example-16-KeepPermissions.ps1 +++ b/Examples/Example-16-KeepPermissions.ps1 @@ -26,7 +26,7 @@ Invoke-GPOZaurrPermission -Verbose -SearchBase 'OU=ITR01,DC=ad,DC=evotec,DC=xyz' Remove-GPOPermission -Type NotAdministrative, NotWellKnownAdministrative -IncludePermissionType GpoEdit, GpoEditDeleteModifySecurity -PermitType Allow -ExcludePrincipal $Exclude -ExcludePrincipalType DistinguishedName Add-GPOPermission -Type Administrative -IncludePermissionType GpoEditDeleteModifySecurity -PermitType Allow Add-GPOPermission -Type AuthenticatedUsers -IncludePermissionType GpoRead -PermitType Allow -} #-WhatIf +} -WhatIf $Exclude = @( 'CN=ITR02_AD Admins,OU=Security,OU=Groups,OU=Production,DC=ad,DC=evotec,DC=xyz' @@ -39,4 +39,4 @@ Invoke-GPOZaurrPermission -Verbose -SearchBase 'OU=ITR02,DC=ad,DC=evotec,DC=xyz' Remove-GPOPermission -Type NotAdministrative, NotWellKnownAdministrative -IncludePermissionType GpoEdit, GpoEditDeleteModifySecurity -PermitType Allow -ExcludePrincipal $Exclude -ExcludePrincipalType DistinguishedName Add-GPOPermission -Type Administrative -IncludePermissionType GpoEditDeleteModifySecurity -PermitType Allow Add-GPOPermission -Type AuthenticatedUsers -IncludePermissionType GpoRead -PermitType Allow -} #-WhatIf +} -WhatIf