From 6c2818121d576a213a2ba26e3404340317761dda Mon Sep 17 00:00:00 2001 From: Przemyslaw Klys Date: Sun, 6 Dec 2020 10:15:55 +0100 Subject: [PATCH] Update example --- Examples/Example-02-RemoveEmptyAndUnlinkedGPOs.ps1 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Examples/Example-02-RemoveEmptyAndUnlinkedGPOs.ps1 b/Examples/Example-02-RemoveEmptyAndUnlinkedGPOs.ps1 index 372207b..13c9955 100644 --- a/Examples/Example-02-RemoveEmptyAndUnlinkedGPOs.ps1 +++ b/Examples/Example-02-RemoveEmptyAndUnlinkedGPOs.ps1 @@ -1,4 +1,10 @@ Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force # Remove GPOS -Remove-GPOZaurr -Type Empty, Unlinked -BackupPath "$Env:UserProfile\Desktop\GPO" -BackupDated -LimitProcessing 2 -Verbose -WhatIf \ No newline at end of file +Remove-GPOZaurr -Type Empty, Unlinked -BackupPath "$Env:UserProfile\Desktop\GPO" -BackupDated -LimitProcessing 2 -Verbose -WhatIf + +# Remove GPOS, but don't touch 2 defined exclusions +Remove-GPOZaurr -Type Empty, Unlinked -BackupPath "$Env:UserProfile\Desktop\GPO" -BackupDated -LimitProcessing 2 -Verbose -WhatIf { + Skip-GroupPolicy -Name 'TEST | Drive Mapping 1' + Skip-GroupPolicy -Name 'TEST | Drive Mapping 2' -DomaiName 'ad.evotec.pl' +} \ No newline at end of file