Loading...
Loading...
Marco Franssen

Have you ever downloaded a ZIP file and realized too late that its contents are blocked by Windows? If you've already extracted it into a folder with existing files, it can be damn hard to figure out which ones need to be unblocked. Right-clicking every file and clicking the Unblock button is a lot of work. Luckily, PowerShell can unblock downloaded files in a whole folder for you.

Let's write a little PowerShell command to unblock files in a specific directory. Start by opening PowerShell and entering the following command.
gci 'c:Somefolder' | Unblock-File -WhatIfThe command above previews the unblock operation for the child items in the given directory. The WhatIf parameter doesn't make any changes; it shows you what the command would do. To actually unblock the files, remove that parameter.
gci 'c:Somefolder' | Unblock-FileAs you may have noticed when using the WhatIf parameter, only files in this folder are included. What if you want to unblock files in subfolders too? You can do that by adding the Recurse parameter.
gci 'c:Somefolder' -Recurse | Unblock-File -WhatIfI've used the WhatIf parameter again so I can check what the command is going to do. Once I'm happy with the preview, I can remove WhatIf and run the command against the files.
gci 'c:Somefolder' -Recurse | Unblock-FileNow you won't have to unblock each file by hand: run the command and you're ready to go. Bookmark this article to find the commands when you need them, and share it with your friends to make their lives a little easier too. Oh, and don't forget to have a look at the 'PowerShell Getting Started Guide' for more information on using PowerShell.
Marco Franssen
Explore the Knockout.js mapping plugin to turn JSON into observable view models, customize property mappings, and build nested employee models.
Marco Franssen
Use Windows Phone 8 accent colors in your apps with a C# helper for hexadecimal color values and a SolidColorBrush property for MVVM binding.
Marco Franssen
Use an old 256 MB USB stick to boot Windows PE, connect to a network share, and install Windows 8 without storing the full ISO on the USB drive.
Marco Franssen
Configure and test ASP.NET MVC 3 authorization with FluentSecurity, including role policies, Castle Windsor integration, and policy violation handlers.