Files
GPOZaurr/Docs/Remove-GPOZaurrFolders.md
T
Przemysław Kłys f7bdaca724 docs: ✏️ Update documentation for GPOZaurr module
- Revised `Set-GPOZaurrOwner.md` to enhance clarity and detail for parameters and examples.
- Updated `Set-GPOZaurrStatus.md` with a new online version link and improved structure.
- Refined `Skip-GroupPolicy.md` to clarify usage within script blocks and added examples.
- Adjusted `GPOZaurr.psd1` for version updates and improved module dependencies.
- Enhanced `GPOZaurr.psm1` for better error handling during function imports.
- Modified `Invoke-GPOZaurrSupport.ps1` examples to use `Join-Path` for path construction.
2026-05-19 18:47:50 +02:00

4.6 KiB

external help file, Module Name, online version, schema
external help file Module Name online version schema
GPOZaurr-help.xml GPOZaurr https://github.com/EvotecIT/GPOZaurr 2.0.0

Remove-GPOZaurrFolders

SYNOPSIS

Removes specified GPOZaurr folders and backs them up to a specified path.

SYNTAX

__AllParameterSets

Remove-GPOZaurrFolders [[-BackupPath] <string>] [[-Type] <string[]>] [-FolderType] <string> [[-FolderName] <string[]>] [[-LimitProcessing] <int>] [[-Forest] <string>] [[-ExcludeDomains] <string[]>] [[-IncludeDomains] <string[]>] [[-ExtendedForestInformation] <IDictionary>] [-BackupDated] [-WhatIf] [-Confirm] [<CommonParameters>]

DESCRIPTION

This function removes specified GPOZaurr folders based on the provided criteria and backs them up to a specified path. It allows for filtering by folder type, domain, and other parameters.

EXAMPLES

EXAMPLE 1

PS > Remove-GPOZaurrFolders -BackupPath "C:\Backups" -BackupDated -Type 'All' -FolderType 'NTFRS' -FolderName "Folder1" -LimitProcessing 10 -Forest "ExampleForest" -ExcludeDomains "Domain1" -IncludeDomains "Domain2" -ExtendedForestInformation $info
Removes GPOZaurr folders of type 'NTFRS' named "Folder1" from all domains in the forest "ExampleForest", backs them up to "C:\Backups" with a timestamp, and limits processing to 10 folders.

PARAMETERS

-BackupDated

Indicates whether the backup path should include a timestamp.

Type: SwitchParameter
Parameter Sets: __AllParameterSets
Aliases: 
Possible values: 

Required: False
Position: named
Default value: False
Accept pipeline input: False
Accept wildcard characters: True

-BackupPath

The path where the GPOZaurr folders will be backed up.

Type: String
Parameter Sets: __AllParameterSets
Aliases: 
Possible values: 

Required: False
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: True

-ExcludeDomains

Specifies domains to exclude from processing.

Type: String[]
Parameter Sets: __AllParameterSets
Aliases: 
Possible values: 

Required: False
Position: 6
Default value: None
Accept pipeline input: False
Accept wildcard characters: True

-ExtendedForestInformation

Specifies additional forest information.

Type: IDictionary
Parameter Sets: __AllParameterSets
Aliases: 
Possible values: 

Required: False
Position: 8
Default value: None
Accept pipeline input: False
Accept wildcard characters: True

-FolderName

Specifies the name of the folder to remove.

Type: String[]
Parameter Sets: __AllParameterSets
Aliases: 
Possible values: 

Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: True

-FolderType

Specifies the type of folders to remove. Options are 'NTFRS' or 'Empty'.

Type: String
Parameter Sets: __AllParameterSets
Aliases: 
Possible values: NTFRS, Empty

Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: True

-Forest

Specifies the forest to target.

Type: String
Parameter Sets: __AllParameterSets
Aliases: ForestName
Possible values: 

Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: True

-IncludeDomains

Specifies domains to include in processing.

Type: String[]
Parameter Sets: __AllParameterSets
Aliases: Domain, Domains
Possible values: 

Required: False
Position: 7
Default value: None
Accept pipeline input: False
Accept wildcard characters: True

-LimitProcessing

Limits the number of folders to process.

Type: Int32
Parameter Sets: __AllParameterSets
Aliases: 
Possible values: 

Required: False
Position: 4
Default value: 2147483647
Accept pipeline input: False
Accept wildcard characters: True

-Type

Specifies the type of folders to remove. Options are 'All', 'Netlogon', or 'Sysvol'.

Type: String[]
Parameter Sets: __AllParameterSets
Aliases: 
Possible values: All, Netlogon, Sysvol

Required: False
Position: 1
Default value: All
Accept pipeline input: False
Accept wildcard characters: True

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

  • None

OUTPUTS

  • None
  • None