Unblocking Multiple Files

by Jun 23, 2022

When you download files from the internet, or when you copy files from untrusted sources to an NTFS-formatted drive, Windows adds a secret NTFS stream to these files as an extra layer of security.

“Blocked” files won’t run, and “blocked” binaries like DLLs won’t load. That’s why it’s important to unblock such files before using them. Essentially, unblocking is done by removing the hidden NTFS stream that marks the files as coming from an “untrusted source”.

PowerShell clears the hidden NTFS stream of a file with the Unblock-File cmdlet. To unblock many files, i.e. the complete content of entire subfolders, simply use Get-ChildItem and pipe the results to Unblock-File:

Get-ChildItem -Path $home\desktop -File -Recurse | Unblock-File 


Twitter This Tip! ReTweet this Tip!