API Reference
Remove-GPOZaurrBroken
Finds and removes broken Group Policies from SYSVOL or AD or both.
Remarks
Finds and removes broken Group Policies from SYSVOL or AD or both. Assesment is based on Get-GPOZaurrBroken and there are 3 supported types: - AD - meaning GPOs which have no SYSVOL content will be deleted from AD - SYSVOL - meaning GPOs which have no AD content will be deleted from SYSVOL - ObjectClass - meaning GPOs which have ObjectClass category of Container rather than groupPolicyContainer will be deleted from AD & SYSVOL
Examples
EXAMPLE 1
PS >
Remove-GPOZaurrBroken -Verbose -WhatIf -Type AD, SYSVOL
EXAMPLE 2
PS >
Remove-GPOZaurrBroken -Verbose -WhatIf -Type AD, SYSVOL -IncludeDomains 'ad.evotec.pl' -LimitProcessing 2
EXAMPLE 3
PS >
Remove-GPOZaurrBroken -Verbose -IncludeDomains 'ad.evotec.xyz' -BackupPath $Env:UserProfile\Desktop\MyBackup1 -WhatIf -Type AD, SYSVOL
Common Parameters
This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
For more information, see about_CommonParameters.
Syntax
Remove-GPOZaurrBroken [-BackupDated] [-BackupPath <String>] [-ExcludeDomains <String[]>] [-ExtendedForestInformation <IDictionary>] [-Forest <String>] [-IncludeDomains <String[]>] [-LimitProcessing <Int32>] -Type <SYSVOL|AD|ObjectClass> [<CommonParameters>]
#
All Parameter SetsParameters
- BackupDated SwitchParameter
- Forces backup to be created within folder that has date in it
- BackupPath String
- Path to optional backup of SYSVOL content before deletion
- ExcludeDomains String[]
- Exclude domain from search, by default whole forest is scanned
- ExtendedForestInformation IDictionary
- Ability to provide Forest Information from another command to speed up processing
- Forest String
- Target different Forest, by default current forest is used
- IncludeDomains String[]
- Include only specific domains, by default whole forest is scanned
- LimitProcessing Int32
- Allows to specify maximum number of items that will be fixed in a single run. It doesn't affect amount of GPOs processed
- Type String[]
- Choose one or more types to delete. Options are AD, ObjectClass, SYSVOL
- Possible values:
SYSVOL,AD,ObjectClass