This commit is contained in:
Przemysław Kłys
2020-04-07 20:26:28 +02:00
parent 1241cf3680
commit 3fce54e75a
7 changed files with 210 additions and 127 deletions
@@ -1,12 +1,5 @@
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
# Backup GPOs
$BackupPath = "$Env:UserProfile\Desktop\GPO"
$GPOSummary = Backup-GPOZaurr -BackupPath $BackupPath -Verbose -Type EmptyAndUnlinked
$GPOSummary | Format-Table -AutoSize
# Confirm GPOs are backed up properly
#Get-GPOZaurrBackupInformation -BackupFolder $GPOSummary[0].BackupDirectory | Format-Table -a
# Remove GPOS
Remove-GPOZaurr -Type EmptyAndUnlinked -Verbose
$BackupPath = "$Env:UserProfile\Desktop\GPO"
Remove-GPOZaurr -Type EmptyAndUnlinked -BackupPath $BackupPath -BackupDated -LimitProcessing 2 -Verbose