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 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:
Bulk Unblock multiple files downloaded from the Internet
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 availableOpen PowerShell with admin privileges.Type the following and execute
The command above uses the DIR command to generate a list of files, and then it is sent to the Unblock-File commandlet.You will not receive any kind of confirmation, but all the files will be unblocked.
If you want only to unblock files names of which include e.g., TWC, then the command will be like: Those who need to confirm unblocking for 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 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.