Unblock a downloaded file on Windows
Remove the Mark of the Web from downloaded files with Unblock-File.
01Command
$ Unblock-File -Path "C:\Users\me\Downloads\setup.exe"02What it does
Files saved from browsers and email carry a hidden Zone.Identifier tag — the Mark of the Web — which makes Windows show 'This file came from another computer' warnings and can block scripts entirely. Unblock-File deletes that tag, and `Get-Item file | Select-Object -ExpandProperty Stream` first shows whether it is present. In an elevated terminal, `Unblock-File -Path "C:\Tools\*"` clears a whole folder at once.
03Risk
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- Unblock-FileEvidence: Unblock-File removes the Zone.Identifier alternate data stream (Mark of the Web) that Windows adds to files downloaded from the internet.
- Reg - Read and edit the registryEvidence: reg query can inspect the Zone.Identifier stream information stored for downloaded files.
Last verified: 2026-09-18 · Category: Security & Privacy
06Related solutions
Two-step command sequence that makes you the owner of a locked file tree and grants yourself full control — the standard fix for 'Access is denied' on old profiles and OS reinstall leftovers.
Read the Authenticode signature status and signer of any executable or script in PowerShell.
Windows' built-in tool for overwriting freed disk clusters so previously deleted files can't be recovered — no third-party shredder needed.