< Back

Expand-ZipFile

Sun Jan 12, 2020 5:59 pm

NAME Expand-ZipFile



SYNOPSIS

Extracts the content of a zip file to a target folder.





SYNTAX

Expand-ZipFile [-Path] <String> [[-DestinationPath] <String>] [-Force] [-Clean] [<CommonParameters>]





DESCRIPTION

Extracts the content of a zip file to a target folder. For performance reasons,

it leverages 7-zip if its found in the path. Otherwise, it'll use the Expand-Archive,

the PowerShell built-in CmdLet. If DestinationPath is not set, it'll create a random

folder in the temp directory.





PARAMETERS

-Path <String>

The path to the zip file that will be extracted.



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-DestinationPath <String>

The path to the target folder where the extracted files will be saved.



Required? false

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Force [<SwitchParameter>]

If specified it'll override existing content of the target folder



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-Clean [<SwitchParameter>]



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS

System.String





-------------------------- EXAMPLE 1 --------------------------



PS C:\\># Expands the zipfile to a temporary folder



Expand-ZipFile "C:\\Mydocs\\temp.zip" "C:\\Mydocs\\"











RELATED LINKS