How to Extract a ZIP in PowerShell Without Overwrites

Extract into a new destination folder
Use Expand-Archive with an explicit ZIP and a fresh destination:
Expand-Archive -LiteralPath 'C:\Archives\bundle.zip' `
-DestinationPath 'C:\Temp\bundle-review'
Current Microsoft documentation says the destination is created if it does not exist and existing files are not overwritten by default. This example deliberately omits -Force, which would permit overwrites.
These commands use syntax shared by Windows PowerShell 5.1 and current PowerShell 7 releases. The command extracts data; it does not certify that the archive or its contents are safe.
Run the example without administrator rights unless the approved workflow specifically requires elevation. A review folder under a user-controlled temporary or work location should not need system privileges, and elevation increases the damage an incorrect destination can cause.
Verify both paths first
Check that the ZIP exists and the destination does not:
Test-Path -LiteralPath 'C:\Archives\bundle.zip' -PathType Leaf
Test-Path -LiteralPath 'C:\Temp\bundle-review'
The first result should be True. For the fresh-folder workflow, the second should be False. Then inspect the source file:
Get-Item -LiteralPath 'C:\Archives\bundle.zip' |
Format-List FullName, Length, LastWriteTime
Do not copy these example paths blindly. Choose a destination inside a location you own and intend to use, not a system folder, synced production directory, application installation, or another person's workspace.
The PowerShell basics guides make paths visible before actions because “somewhere under Downloads” is not a rollback strategy.
Do not rely on WhatIf for an absent folder
Expand-Archive exposes PowerShell's -WhatIf common parameter, but Windows PowerShell 5.1 has an important trap in this exact workflow: when the destination is absent, -WhatIf can announce that it would create the directory and then report that the destination does not exist. The preview suppresses the creation that later validation expects.
That means a fresh-folder extraction should not use -WhatIf as its decisive safety check. Verify the source, destination text, destination parent, and Test-Path results instead, then run the command without -Force. A preview against an already existing destination answers a different question and abandons the clean absent-folder assumption used here.
For untrusted or business-critical material, use your organization's isolated inspection and security process rather than extracting directly into an ordinary workstation. No preview can assess malicious content, decompression size, filename tricks, or whether the archive matches what you expected.
Run without Force
When ready:
Expand-Archive -LiteralPath 'C:\Archives\bundle.zip' `
-DestinationPath 'C:\Temp\bundle-review'
Do not add -PassThru to this cross-version example. Expand-Archive in Windows PowerShell 5.1 does not provide that parameter, although newer PowerShell documentation includes it. Inventory the destination explicitly after extraction so the same workflow behaves in both editions.
If the destination unexpectedly exists, stop. Do not add -Force as a reflex. According to the current command documentation, -Force overwrites existing files. Instead, choose another new folder or inspect, back up, and deliberately reconcile the existing destination through an approved process.
This tutorial does not provide an overwrite command. Keeping important files intact is more useful than winning a disagreement with an error message.
Inventory the extracted tree
List the destination without opening anything:
Get-ChildItem -LiteralPath 'C:\Temp\bundle-review' -Force -Recurse -File |
Select-Object FullName, Length, LastWriteTime
Look for unexpected executable or script extensions, duplicate-looking names, hidden items, unusual depth, or a total file size that does not fit the expected package. The -File switch excludes directories, whose Length field would otherwise be blank. Do not run an unfamiliar program to discover what it is.
Archives can contain names that display differently across tools or systems. If anything looks wrong, leave the contents untouched and use the relevant security procedure.
Know the command's scope
Expand-Archive handles ZIP archives. Renaming .7z, .rar, .tar, or another format to .zip does not convert it. Use a trusted tool that explicitly supports the real archive type.
Microsoft documents a 2 GB maximum individual file size for the .NET ZIP API used by this cmdlet's implementation. Very large, encrypted, split, malformed, or specialized archives may require another reviewed workflow.
Use -LiteralPath when the filename contains characters such as square brackets that -Path could interpret as wildcard syntax. Literal handling prevents wildcard expansion; it does not validate the source.
Verify before and after
The file-integrity guides explain what checksums can and cannot establish. If the publisher supplies a trusted checksum, use the SHA-256 PowerShell guide before extraction. After extraction, check the package's official manifest or signature if one exists.
Finally, remove the review folder only through a deliberate, separately verified cleanup step after you know its exact contents and retention needs. Extraction is reversible when the destination is fresh. Overwriting somebody's final-final-really-final folder is considerably less charming.
Record the source archive path and destination before closing the session when the work must be audited. That small note distinguishes an intentional review copy from an unexplained directory that another person may later mistake for the authoritative files.