Powershell Unblock All Files In Folder 💎

PowerShell includes a simple yet powerful cmdlet: . It removes the Zone.Identifier stream, telling Windows the file is safe.

New-Item -Path "Registry::HKEY_CLASSES_ROOT\Directory\shell\UnblockFiles" -Force | Out-Null Set-ItemProperty -Path "Registry::HKEY_CLASSES_ROOT\Directory\shell\UnblockFiles" -Name "(Default)" -Value "Unblock All Files" powershell unblock all files in folder

param( [Parameter(Mandatory=$true)] [string]$FolderPath, [switch]$Recurse, PowerShell includes a simple yet powerful cmdlet:

# Check which files are currently blocked Get-ChildItem -Path "C:\Path\To\Your\Folder" -Recurse | Get-Item -Stream "Zone.Identifier" -ErrorAction SilentlyContinue | Select-Object FileName run this first:

Sometimes files are supposed to be blocked for security. If you want to see which files will be unblocked before you actually do it, run this first: