Skip to content

Latest commit

 

History

History
120 lines (83 loc) · 2.86 KB

Remove-ZipEntry.md

File metadata and controls

120 lines (83 loc) · 2.86 KB
external help file Module Name online version schema
PSCompression.dll-Help.xml
PSCompression
2.0.0

Remove-ZipEntry

SYNOPSIS

Removes zip entries from one or more zip archives.

SYNTAX

Remove-ZipEntry
    -InputObject <ZipEntryBase[]>
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

DESCRIPTION

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.

EXAMPLES

Example 1: Remove all Zip Archive Entries from a Zip Archive

PS ..pwsh\> Get-ZipEntry .\myZip.zip | Remove-ZipEntry

Example 2: Remove all .txt Entries from a Zip Archive

PS ..pwsh\> Get-ZipEntry .\myZip.zip -Include *.txt | Remove-ZipEntry

Example 3: Prompt for confirmation before removing entries

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.

PARAMETERS

-InputObject

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

-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

-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

CommonParameters

This cmdlet supports the common parameters. For more information, see about_CommonParameters.

INPUTS

ZipEntryBase

You can pipe instances of ZipEntryFile and ZipEntryDirectory to this cmdlet. These instances are produced by Get-ZipEntry and New-ZipEntry cmdlets.

OUTPUTS

None

This cmdlet produces no output.