I recently stumbled across a somewhat frustrating feature of Windows 10. With the intent of protecting users from viruses and other malware, any file you download from another computer is by default 'blocked'. The standard way to unblock a file is to right-click on the file you downloaded and check the box next to "Unblock".
This method works great for individual files that you download. However, when a coworker sent me a zip file containing a multi-project Visual Studio Solution via Skype, I discovered that it would extract fewer than a third of the files from the zip file. The extractor would refuse to extract any of the Powershell scripts, BAT files or EXE files contained within the zip file. Since the zip file contained over 1000 files, unblocking them manually would be a trying experience. I needed a neat solution to iterate through all files in the zip and unblock them all.
Powershell came to the rescue. Simply start Powershell as Administrator and enter the following command:
get-childitem "C:\FullFilePathName" -recurse | unblock-file
where C:\FullFilePathName is the full file path name for the zip file you want to unblock.
After running the above command, I was able to extract all of the files and run the Visual Studio solution without issues.
PS: please only use this solution when you know that you can trust the source of the files.
Just wanted to say that I'll be speaking at SQL Saturday Phoenix on 17 March 2018 on " Power BI: The Magic of M. " My pre...
I've been playing with PowerBI recently and have discovered their Gallery of Custom Visuals . I decided to try a few to see what they d...
This post is part of T-SQL Tuesday , a monthly blog party on the second Tuesday of each month which was started back in 2009. This month'...
I've been playing with PowerBI recently, and have discovered their Gallery of Custom Visuals . I decided to try some to see what they ...