• Home
  • About 404TS
  • Contact

404 Tech Support

Where IT Help is Found

  • Articles
    • Code
    • Entertainment
    • Going Green
    • Hardware, Gadgets, and Products
    • Management
    • Network
    • News
    • Operating Systems
    • Security and Privacy
    • Software
    • System Administration
    • Talking Points
    • Tech Solutions
    • Web
    • Webmaster
  • Reviews
  • Media
    • Infographics
    • Videos
  • Tech Events
  • Tools
    • How do I find my IP address?
    • Browser and plugin tests
  • Get a Technical Consultation
You are here: Home / Articles / Tech Solutions / How to ‘Unblock’ multiple files at a time with PowerShell

How to ‘Unblock’ multiple files at a time with PowerShell

2016-06-24 by Jason

If you have been frustrated by the warning message on Windows computers “This file came from another computer and might be blocked to help protect this computer.”, you are not alone. The warning might pop up when you try to open a file that you downloaded from the Internet. It can cause a decent amount of frustration because of the way it is implemented.

If you right-click on a single file and choose Properties, you can see the Security section at the bottom of the window.

“This file came from another computer and might be blocked to help protect this computer.”

unblock_internetfile

You can check the box (in Windows 10) or click the Unblock button (in Windows 7/8) to unblock the file. However, if you have multiple files, you cannot select more than one and view the properties to unblock all of the files at once. Instead, you will have to check each file separately and unblock them one at a time. One tip was to always unblock a zip file before extracting it for this reason.

unblock_multipleproperties

You can disable the setting through Group Policy by enabling the setting ‘Do not preserve zone information in file attachments’ found under User Configuration -> Administrative Templates -> Windows Components -> Attachment Manager. I don’t recommend this as I prefer to keep security warnings in place. I previously dealt with this several years ago when a script had problems running a blocked file where the solution was to add a UNC path of the file to the Trusted Sites Intranet zone.

Microsoft has a command line utility called ‘streams’ that you can download and tell it to remove the NTFS-attached data stream that identifies a file as downloaded from the Internet. The command for this is streams -s -d [directory path]. Nirsoft also has a utility called Alternate Data Streams with similar functionality.

Rather than having to download a separate executable, there is native PowerShell functionality that will allow us to unblock multiple files at a time. The command is:

dir -Path [directory path] -Recurse | Unblock-File

unblock_powershell

This command will recurse through a directory and all sub-folders and unblock them. If you have a few files that you trust but were downloaded from the Internet, you can quickly get them all by sticking them in a folder and running that PowerShell command on them to have the stream property removed. It certainly beats the weird issues that can be caused by this setting and weird workarounds to zip the files up, unblock the zip and then extracting the files again.

Filed Under: Tech Solutions Tagged With: windows

Trending

  • What technology belongs in the modern conference room?
    In Hardware, Gadgets, and Products
  • There is no welfare when you are below the information security poverty line
    In Security and Privacy
  • WordPress Warns: Popular WordPress Plugins Given Backdoors and Pushed Out
    In Security and Privacy, Software, Webmaster

Latest Media Posts

Find Out Where To Download SNES ROMs

Find Out Where To Download SNES ROMs

Multifunctional Video Conversion Tools – Wondershare Video Converter

Multifunctional Video Conversion Tools – Wondershare Video Converter

  • Popular
  • Latest
  • Today Week Month All
  • How to ‘Unblock’ multiple files at a time with PowerShell How to 'Unblock' multiple files at a time with PowerShell
  • Command line to take ownership and change permissions Command line to take ownership and change permissions
  • Increase IIS Private Memory Limit to improve WSUS availability Increase IIS Private Memory Limit to improve WSUS availability
  • SOLVED: “This modification is not allowed because the selection is locked.” SOLVED: "This modification is not allowed because the selection is locked."
  • Creating and editing views in phpMyAdmin Creating and editing views in phpMyAdmin
  • customer contactless payment for drink with mobile phon at cafe counter bar,seller coffee shop accept payment by mobile.new normal lifestyle concept The Latest Innovations In Payment Technology
  • How Digital Technology Brought the Rise of the CMO   How Digital Technology Brought the Rise of the CMO  
  • How to Purchase Cryptocurrencies? How to Purchase Cryptocurrencies?
  • Top 6 necessary aspects to consider when hiring Angular developers Top 6 necessary aspects to consider when hiring Angular developers
  • Full guide on drawbacks and benefits of Node.js for making the perfect choice for your business Full guide on drawbacks and benefits of Node.js for making the perfect choice for your business
Ajax spinner

Elevator Pitch

404 Tech Support documents solutions to IT problems, shares worthwhile software and websites, and reviews hardware, consumer electronics, and technology-related books.

Subscribe to 404TS articles by email.

Recent Posts

  • The Latest Innovations In Payment Technology
  • How Digital Technology Brought the Rise of the CMO  
  • How to Purchase Cryptocurrencies?

Search

FTC Disclaimer

404TechSupport is an Amazon.com affiliate; when you click on an Amazon link from 404TS, the site gets a cut of the proceeds from whatever you buy. This site also uses Skimlinks for smart monetization of other affiliate links.
Use of this site requires displaying and viewing ads as they are presented.

Copyright © 2023 · Magazine Pro Theme on Genesis Framework · WordPress · Log in