if ($Confirm -and $blockedFiles.Count -gt 0) $response = Read-Host "Unblock these $($blockedFiles.Count) files? (Y/N)" if ($response -ne 'Y') return
param( [Parameter(Mandatory=$false)] [string]$Path = ".", [Parameter(Mandatory=$false)] [switch]$WhatIf, get-childitem -recurse -file | unblock-file
$blockedFiles | Unblock-File Write-Host "Unblocked $($blockedFiles.Count) files" -ForegroundColor Green if ($Confirm -and $blockedFiles