PowerTip: Use PowerShell to Unblock Files in Folder
Summary: Learn how to use Windows PowerShell to unblock files downloaded from the Internet.
I downloaded a module from the Script Center Repository, and when I expanded and copied the files to
my modules folder, I forgot to unblock them. Now every time I start Windows PowerShell, I get error
messages and the modules don’t work. How can I easily fix this situation?
Use the Get-ChildItem cmdlet to return a list of all files in your modules directory, and pipe them to
the Unblock-File cmdlet, for example:
Get-ChildItem -Path 'C:\Program Files\WindowsPowerShell\Modules\' -Recurse | Unblock-File