2025-12-16 10:20:31 -07:00
|
|
|
# Expand-Archive
|
|
|
|
|
|
|
|
|
|
> A cmdlet in PowerShell is used to extract files from a compressed archive.
|
2026-02-18 06:55:01 -07:00
|
|
|
> More information: <https://learn.microsoft.com/powershell/module/microsoft.powershell.archive/expand-archive>.
|
2025-12-16 10:20:31 -07:00
|
|
|
|
|
|
|
|
- Extract a ZIP file to a folder:
|
|
|
|
|
|
|
|
|
|
`Expand-Archive -Path {{path\to\example.zip}} -DestinationPath {{path\to\extracted_files}}`
|
|
|
|
|
|
|
|
|
|
- Overwrite existing files:
|
|
|
|
|
|
|
|
|
|
`Expand-Archive -Path {{path\to\example.zip}} -DestinationPath {{path\to\extracted_files}} -Force`
|
|
|
|
|
|
|
|
|
|
- Preview without extracting:
|
|
|
|
|
|
|
|
|
|
`Expand-Archive -Path {{path\to\example.zip}} -DestinationPath {{path\to\extracted_files}} -WhatIf`
|