Unblock All Files Explorer Integration
When you download files from the Internet using Windows 10 sometimes they will be blocked due to the SmartScreen feature.
If you want to unblock a file you need to right-click the name, open the properties pane, then choose unblock and hit OK or apply:
The problem comes when you download a bunch of files and need to unblock them all. Or maybe you downloaded a ZIP file and forgot to unblock before unzipping. Granted you can disable the blocking behavior entirely but maybe you don’t want to do that…
Now, there are powershell scripts to do this, but you have to open a console and type a couple of commands, so this little registry hack is for all the lazy people out there like me that want just a right-click integration thing with Windows Explorer.
You basically select the parent folder where you want all children to be unblocked (recursively) and… that’s it!
This is what it looks like:
You can download the .reg file and double-click it to install on your machine.
Hope you guys like it!
Skip to content
Once you download files from the Internet, Windows 10 shows you a security warning every time you try to open it. Some file types are blocked from opening. SmartScreen, a security feature of Windows 10, causes such behavior. Let’s see how to unblock those files.
When you try to open a file which was downloaded from the Internet, you can see a warning like this:
To get rid of it, you need to do the following:
- Right click the file in File Explorer.
- In the context menu, select the last item named «Properties».
- In the Properties dialog, on the General tab, tick the checkbox named «Unblock»:
After that, the security warning will disappear.
This is very useful when you need to unblock just one file. In the situation when you need to unblock several files at once, it is impractical to right click on every file, and open its Properties to unblock it.
Using PowerShell, it is posssible unblock multiple files at once in any given folder. It can be done as follows:
- Press Win + R on the keyboard to open the Run dialog.
- In the Run box, type powershell:
- In the PowerShell console, type the following command:
get-childitem "C:\Users\winaero\Downloads" | unblock-file
In this example, C:\Users\winaero\Downloads is the path to the folder which contains all files you need to unblock all at once.
That’s it!
Support us
Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:
If you like this article, please share it using the buttons below. It won’t take a lot from you, but it will help us grow. Thanks for your support!
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.” You can check the box (in Windows 10) or click the Unblock button (in Windows 7/8) to unblock the file.
- How do I unblock all files at once?
- How do you check if a file is blocked PowerShell?
- Why are all my files blocked?
- How do I stop Windows from blocking a file?
- How do I unblock all files in a directory in PowerShell?
- How do I unblock a program that is blocked by administrator?
- How do I unblock a file in PowerShell?
- What is trap in PowerShell?
- How do I unblock a file in Windows Server 2016?
How do I unblock all files at once?
In the situation when you need to unblock several files at once, it is impractical to right click on every file, and open its Properties to unblock it. Using PowerShell, it is posssible unblock multiple files at once in any given folder. It can be done as follows: Press Win + R on the keyboard to open the Run dialog.
How do you check if a file is blocked PowerShell?
You can test if a file is blocked by right clicking the file and looking at its properties – it will have an Unblock button at the bottom right of the dialog. You can also use PowerShell to do this. I prefer the first because it allows me to test and then modify to perform the unblock.
Why are all my files blocked?
When you try to open a file, Windows 10 might prevent you from opening it directly. It’ll show you a security warning that the file originated from an unknown source and can be insecure. This happens when a Windows 10 feature called the Attachment Manager blocks files that it considers unsafe for your PC.
How do I stop Windows from blocking a file?
Click on the «Turn Windows Firewall On or Off» link in the left sidebar. Uncheck the box next to «Block All Incoming Connections, Including Those in the List of Allowed Apps» under Private Network Settings and Public Network Settings. Click the «OK» button to save your changes.
How do I unblock all files in a directory in PowerShell?
Unblock files in a folder using PowerShell
If you want to unblock all files that exist in the sub-folders as well, just add the -Recurse switch.
How do I unblock a program that is blocked by administrator?
Navigate to the file or program that’s being blocked by SmartScreen. Right-click the file. Click Properties. Click the checkbox next to Unblock so that a checkmark appears.
How do I unblock a file in PowerShell?
Unblock-File (PowerShell 3.0+)
Unblock files that were downloaded from the Internet. Syntax Unblock-File [ [-path] | -literalPath ] string[] [-Confirm] [-WhatIf] [CommonParameters] Key -path string[] The files to unblock. Wildcard characters are supported.
What is trap in PowerShell?
Trapping all terminating errors
When a terminating error occurs that is not handled in another way in a script or command, PowerShell checks for a trap statement that handles the error. If a trap statement is present, PowerShell continues running the script or command in the trap statement.
How do I unblock a file in Windows Server 2016?
Once the software is installed you just need to right click on the file or directory that is locked (which you can find using one of the methods above) and click on IOBit Unlocker in the context menu.
When you download a file from the Internet like images, documents, etc. to your Windows computer, they are treated as untrusted files. So if malware is downloaded in the form of JPEG, it will be able to execute anything on the computer. I am sure you have seen errors where you cannot rename the files or if it’s a document, it remains in read-only mode, and so on. However, it can be annoying if you are downloading a lot of files, and all of them should be unlocked. We have seen how to Unblock a file and how to add an Unblock file item to the context menu using PowerShell or Registry. In this post, we will share how you can bulk unblock files downloaded from the Internet.
How to find if the file is blocked?
Right-click on any of the files, and select Properties from the context menu. If the file is blocked, then under the General tab, you will have a security warning. It should say
The file came from another computer and might be blocked to help protect this computer and might be blocked to help protect this computer.
You can check the box next to Unblock, and then save the changes to unblock the file. This option is not available when you select multiple files, go to properties.
How does the Unblock-File command work?
PowerShell offers a built-in command — Unblock-File — to change the unblock status of PowerShell script files that were downloaded from the Internet, but it works on all kinds of files. Internally, the Unblock-File cmdlet removes the “Zone.Identifier alternate data stream“. It has a value of “3” to indicate that it was downloaded from the Internet.
If you apply this on PowerShell scripts, it can unblock PowerShell script files that were downloaded from the Internet so you can run them, even when the PowerShell execution policy is RemoteSigned. The syntax for the command is as follows:
Unblock-File [-Path]/-LiteralPath <String[]> [-WhatIf] [-Confirm] [<CommonParameters>]
Bulk Unblock multiple files downloaded from the Internet on a Windows computer
The command needs single or multiple files. Any output which can pass a list of files to it will work. Here is an example:
- Copy the path where the blocked files are available. To do so, go to th directory where the blocked files are located, then click on the address bar of the File Explorer and press the Ctrl + C keys.
- Open PowerShell with admin privileges.
- Type the following and execute
dir <path> | Unblock-File
- The command above uses the DIR command to generate a list of files, and then it is sent to the Unblock-File command.
- You will not receive any kind of confirmation, but all the files will be unblocked.
Enter the entire path under quotations, otherwise, you will get an error. For example, if you have placed all the blocked files in the “D:\The Windows Club\Images\Blocked Files” path, the command will be:
dir "D:\The Windows Club\Images\Blocked Files" | Unblock-File
If you want only to unblock files the names of which include e.g., TWC, then the command will be like this:
dir <path>\*TWC* | Unblock-File
Those who need to confirm unblocking files one by one can add -Confirm option along with the command. It will then prompt you for each file. If you choose yes, then it will unblock the file, else it will move to the next.
It comes in very handy when you download a file from the Internet and then share it with somebody else. The data remain locked, and they will be able to rename the file unless it is unlocked. You can use this command to unlock all the files, and then send it.
I hope the post was easy to follow, and you were able to unblock multiple files or bulk files downloaded from the Internet.
How can I get all DLL files?
If the DLL files are missing, there are some ways by which you can recover them. If you think about downloading the missing DLL files from third-party websites, we do not recommend this. This is because such files can contain viruses or malware. You use built-in System File Checker and DISM tools to fix the missing DLL files. If the DLL file associated with a particular software is missing, reinstalling that software fixes this problem.
Why are downloaded files blocked?
Today, popular browsers, like Edge, Chrome, Firefox, etc., have a built-in feature to detect suspicious files and block them from downloading on your system. The most common reason why your downloads are being blocked is they are infected.
Read next: How to block EXE files from running using Group Policy in Windows.
You are here: Home / Articles / Tech Solutions / How to ‘Unblock’ multiple files at a time with PowerShell
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.”
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.
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
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.