Extract a ZIP with Expand-Archive
Unzip archives from PowerShell, including into a non-existent destination that gets created.
01Command
$ Expand-Archive -Path .\project-backup.zip -DestinationPath .\restored -Force02What it does
Expand-Archive is the counterpart to Compress-Archive and handles any standard ZIP file. The destination folder is created if it does not exist, and -Force overwrites files already there instead of throwing an error. It is especially handy in WinRE recovery environments and CI scripts where Explorer is not available.
03Risk
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- Expand-Archive (Microsoft.PowerShell.Archive)Evidence: Documents Expand-Archive with -Path, -DestinationPath and -Force to extract ZIP archives from PowerShell.
Last verified: 2026-09-17 · Category: Files & Folders
06Related solutions
Create or update a .zip from any files or folder contents straight from PowerShell.
Search inside text files and logs with regex, returning file, line number and match.
A built-in PowerShell one-liner that answers 'is port 5432/3389/443 actually open through this network?' — no telnet client needed.