external help file | Module Name | online version | schema |
---|---|---|---|
PSCompression.dll-Help.xml |
PSCompression |
2.0.0 |
Removes zip entries from one or more zip archives.
Remove-ZipEntry
-InputObject <ZipEntryBase[]>
[-WhatIf]
[-Confirm]
[<CommonParameters>]
The Remove-ZipEntry
cmdlet can remove Zip Archive Entries from one or more Zip Archives. This cmdlet takes input from and is intended to be used in combination with the Get-ZipEntry
cmdlet.
PS ..pwsh\> Get-ZipEntry .\myZip.zip | Remove-ZipEntry
PS ..pwsh\> Get-ZipEntry .\myZip.zip -Include *.txt | Remove-ZipEntry
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 cmdlet supports ShouldProcess
, you can prompt for confirmation before removing entries with -Confirm
or check what the cmdlet would do without performing any action with -WhatIf
.
The entries that should be removed. This parameter can be and is meant to be bound from pipeline however can be also used as a named parameter.
Type: ZipEntryBase[]
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
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
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
This cmdlet supports the common parameters. For more information, see about_CommonParameters.
You can pipe instances of ZipEntryFile
and ZipEntryDirectory
to this cmdlet. These instances are produced by Get-ZipEntry
and New-ZipEntry
cmdlets.
This cmdlet produces no output.