Blog

The command works by piping the output of a file discovery cmdlet into a utility that strips security restrictions:

: While Unblock-File will only act on files (and silently ignore directories), it's still worth noting that it doesn't differentiate between files based on their type or content. It will attempt to unblock all files.

Check if files remain blocked:

Let’s crack open the syntax to see how it works under the hood.

This is the scavenger.

When you run Get-ChildItem -Path . -Recurse | Unblock-File , you're essentially telling PowerShell to go through every file in the current directory and its subdirectories, and then remove the "mark of the web" from all of them. This can be useful if you've downloaded a lot of files from the internet and want to avoid having to right-click and select "Unblock" on each one.