| external help file | PSPublishModule-help.xml |
|---|---|
| Module Name | PSPublishModule |
| online version | https://github.com/EvotecIT/PSPublishModule |
| schema | 2.0.0 |
Removes specific files and folders from a project directory with safety features.
Remove-ProjectFiles -ProjectPath <string> [-ProjectType <ProjectCleanupType>] [-ExcludePatterns <string[]>] [-ExcludeDirectories <string[]>] [-DeleteMethod <ProjectDeleteMethod>] [-CreateBackups] [-BackupDirectory <string>] [-Retries <int>] [-Recurse] [-MaxDepth <int>] [-ShowProgress] [-PassThru] [-Internal] [-WhatIf] [-Confirm] [<CommonParameters>]Remove-ProjectFiles -ProjectPath <string> -IncludePatterns <string[]> [-ExcludePatterns <string[]>] [-ExcludeDirectories <string[]>] [-DeleteMethod <ProjectDeleteMethod>] [-CreateBackups] [-BackupDirectory <string>] [-Retries <int>] [-Recurse] [-MaxDepth <int>] [-ShowProgress] [-PassThru] [-Internal] [-WhatIf] [-Confirm] [<CommonParameters>]Designed for build/CI cleanup scenarios where removing generated artifacts (bin/obj, packed outputs, temporary files) should be predictable and safe. Supports -WhatIf, retries and optional backups.
PS> Remove-ProjectFiles -ProjectPath '.' -ProjectType Build -WhatIfShows what would be removed for the selected cleanup type.
PS> Remove-ProjectFiles -ProjectPath '.' -IncludePatterns 'bin','obj','*.nupkg' -CreateBackups -BackupDirectory 'C:\Backups\MyRepo'Creates backups before deletion and stores them under the backup directory.
Directory where backups should be stored (optional).
Type: String
Parameter Sets: ProjectType, Custom
Aliases: None
Possible values:
Required: False
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: TrueCreate backup copies of items before deletion.
Type: SwitchParameter
Parameter Sets: ProjectType, Custom
Aliases: None
Possible values:
Required: False
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: TrueMethod to use for deletion.
Type: ProjectDeleteMethod
Parameter Sets: ProjectType, Custom
Aliases: None
Possible values: RemoveItem, DotNetDelete, RecycleBin
Required: False
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: TrueDirectory names to completely exclude from processing.
Type: String[]
Parameter Sets: ProjectType, Custom
Aliases: None
Possible values:
Required: False
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: TruePatterns to exclude from deletion.
Type: String[]
Parameter Sets: ProjectType, Custom
Aliases: None
Possible values:
Required: False
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: TrueFile/folder patterns to include for deletion when using the Custom parameter set.
Type: String[]
Parameter Sets: Custom
Aliases: None
Possible values:
Required: True
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: TrueSuppress console output and use verbose/warning streams instead.
Type: SwitchParameter
Parameter Sets: ProjectType, Custom
Aliases: None
Possible values:
Required: False
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: TrueMaximum recursion depth. Default is unlimited (-1).
Type: Int32
Parameter Sets: ProjectType, Custom
Aliases: None
Possible values:
Required: False
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: TrueReturn detailed results.
Type: SwitchParameter
Parameter Sets: ProjectType, Custom
Aliases: None
Possible values:
Required: False
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: TruePath to the project directory to clean.
Type: String
Parameter Sets: ProjectType, Custom
Aliases: None
Possible values:
Required: True
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: TrueType of project cleanup to perform.
Type: ProjectCleanupType
Parameter Sets: ProjectType
Aliases: None
Possible values: Build, Logs, Html, Temp, All
Required: False
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: TrueProcess subdirectories recursively. Defaults to true unless explicitly specified.
Type: SwitchParameter
Parameter Sets: ProjectType, Custom
Aliases: None
Possible values:
Required: False
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: TrueNumber of retry attempts for each deletion.
Type: Int32
Parameter Sets: ProjectType, Custom
Aliases: None
Possible values:
Required: False
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: TrueDisplay progress information during cleanup.
Type: SwitchParameter
Parameter Sets: ProjectType, Custom
Aliases: None
Possible values:
Required: False
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: TrueThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
None
System.Object
- None