| external help file | PSCompression.dll-Help.xml |
|---|---|
| Module Name | PSCompression |
| online version | https://github.com/santisq/PSCompression |
| schema | 2.0.0 |
Removes specified entries from zip archives.
Remove-ZipEntry
-InputObject <ZipEntryBase[]>
[-WhatIf]
[-Confirm]
[<CommonParameters>]The Remove-ZipEntry cmdlet removes ZipEntryFile or ZipEntryDirectory objects produced by Get-ZipEntry or New-ZipEntry from their parent zip archives.
PS ..pwsh\> Get-ZipEntry .\myZip.zip | Remove-ZipEntryThis example removes all entries from myZip.zip, effectively emptying the archive.
PS ..pwsh\> Get-ZipEntry .\myZip.zip -Include *.txt | Remove-ZipEntryThis example removes only the entries matching the *.txt pattern from myZip.zip.
PS ..pwsh\> Get-ZipEntry .\myZip.zip -Include *.txt | Remove-ZipEntry -Confirm
Confirm
Are you sure you want to perform this action?
Performing the operation "Remove" on target "test/helloworld.txt".
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"):This example prompts for confirmation before removing each matching entry. The cmdlet supports ShouldProcess: use -Confirm to prompt or -WhatIf to preview changes without applying them.
Specifies the zip entries to remove. This parameter accepts pipeline input from Get-ZipEntry or New-ZipEntry and can also be used as a named argument.
Type: ZipEntryBase[]
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: FalsePrompts 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: FalseShows 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: FalseThis cmdlet supports the common parameters. For more information, see about_CommonParameters.
You can pipe one or more ZipEntryFile or ZipEntryDirectory objects produced by Get-ZipEntry or New-ZipEntry to this cmdlet.
This cmdlet produces no output.