PowerShell Logo Small

Expand-Archive



This is the built-in help made by Microsoft for the command 'Expand-Archive', in PowerShell version 5 - as retrieved from Windows version 'Microsoft Windows Server 2012 R2 Standard' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.

SYNOPSIS

Extracts files from a specified archive (zipped) file.

SYNTAX


Expand-Archive [-Path] <String> [-DestinationPath] <String> [-Force] [-Confirm] [-WhatIf] [<CommonParameters>]
Expand-Archive [-DestinationPath] <String> [-Force] -LiteralPath <String> [-Confirm] [-WhatIf] [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Expand-Archive cmdlet extracts files from a specified zipped archive file to a specified destination folder. An archive file allows multiple files to be packaged, and
optionally compressed, into a single zipped file for easier distribution and storage.



<

RELATED LINKS


Online Version: http://go.microsoft.com/fwlink/?LinkID=393253

REMARKS

<

Examples


Example 1: Extract the contents of an archive

PS C:\>Expand-Archive -LiteralPath C:\Archives\Draft.Zip -DestinationPath C:\Reference



This command extracts the contents of an existing archive file, Draft.zip, into the folder specified by the DestinationPath parameter, C:\Reference.




Example 2: Extract the contents of an archive in the current folder

PS C:\>Expand-Archive -Path Draft.Zip -DestinationPath C:\Reference



This command extracts the contents of an existing archive file in the current folder, Draft.zip, into the folder specified by the DestinationPath parameter, C:\Reference.