How to unblock a file when there is no unblock option

Funny things happen in the restricted environments. Normally, if you download a zip file from the internet, you can use “unblock” option to instruct the system that this particular zip file is safe. Well, not on that particular workstation which I had to work on today. There was just no “”unblock” option at all.

So, in case you are wondering what to do in such situation, and, also, just so there was a recipe for my own reference, there is a solution provided here (actually, even two solutions):

http://superuser.com/questions/38476/this-file-came-from-another-computer-how-can-i-unblock-all-the-files-in-a/38483#38483

 

The one solution that I did not try but that seems to be the better one is using powershell. You just need to run the following command:

dir c:\mydir -Recurse | Unblock-File

 

The other solution which I did try and which worked for me involves downloading one of those magical sysinternal utilities:

https://technet.microsoft.com/en-us/sysinternals/bb897440.aspx?f=255&MSPPError=-2147217396

Once you have it downloaded, just run the following command:

streams -s -d directory

The caveat here is that you might do some damage with this command if, for example, you ran it against your C drive.. so, make sure to use it only on the directories which don’t have anything but your files.