4.3 KiB
external help file, Module Name, online version, schema
| external help file | Module Name | online version | schema |
|---|---|---|---|
| GPOZaurr-help.xml | GPOZaurr | 2.0.0 |
Remove-GPOZaurrBroken
SYNOPSIS
Finds and removes broken Group Policies from SYSVOL or AD or both.
SYNTAX
Remove-GPOZaurrBroken [-Type] <String[]> [-BackupPath <String>] [-BackupDated] [-LimitProcessing <Int32>]
[-Forest <String>] [-ExcludeDomains <String[]>] [-IncludeDomains <String[]>]
[-ExtendedForestInformation <IDictionary>] [-WhatIf] [-Confirm] [<CommonParameters>]
DESCRIPTION
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
Remove-GPOZaurrBroken -Verbose -WhatIf -Type AD, SYSVOL
EXAMPLE 2
Remove-GPOZaurrBroken -Verbose -WhatIf -Type AD, SYSVOL -IncludeDomains 'ad.evotec.pl' -LimitProcessing 2
EXAMPLE 3
Remove-GPOZaurrBroken -Verbose -IncludeDomains 'ad.evotec.xyz' -BackupPath $Env:UserProfile\Desktop\MyBackup1 -WhatIf -Type AD, SYSVOL
PARAMETERS
-Type
Choose one or more types to delete. Options are AD, ObjectClass, SYSVOL
Type: String[]
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-BackupPath
Path to optional backup of SYSVOL content before deletion
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-BackupDated
Forces backup to be created within folder that has date in it
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-LimitProcessing
Allows to specify maximum number of items that will be fixed in a single run. It doesn't affect amount of GPOs processed
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: 2147483647
Accept pipeline input: False
Accept wildcard characters: False
-Forest
Target different Forest, by default current forest is used
Type: String
Parameter Sets: (All)
Aliases: ForestName
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-ExcludeDomains
Exclude domain from search, by default whole forest is scanned
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-IncludeDomains
Include only specific domains, by default whole forest is scanned
Type: String[]
Parameter Sets: (All)
Aliases: Domain, Domains
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-ExtendedForestInformation
Ability to provide Forest Information from another command to speed up processing
Type: IDictionary
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
INPUTS
OUTPUTS
NOTES
General notes