Get-childitem -recurse -file | Unblock-file ((better))
: This filters the results to only include files, skipping directories.
Get-ChildItem -Recurse -File | Unblock-File -Verbose get-childitem -recurse -file | unblock-file
Get-ChildItem -Recurse -File | ForEach-Object $hasStream = Get-Item $_.FullName -Stream Zone.Identifier -ErrorAction SilentlyContinue if ($hasStream) Write-Host "STILL BLOCKED: $($_.FullName)" -ForegroundColor Red : This filters the results to only include
[Parameter(Mandatory=$false)] [switch]$Confirm get-childitem -recurse -file | unblock-file