Prioritizing Your Website Needs Before Business

Get-childitem -recurse -file | Unblock-file -

if ($Confirm -and $blockedFiles.Count -gt 0) $response = Read-Host "Unblock these $($blockedFiles.Count) files? (Y/N)" if ($response -ne 'Y') return

if ($WhatIf) Format-Table -AutoSize return get-childitem -recurse -file | unblock-file

[Parameter(Mandatory=$false)] [switch]$Confirm ) if ($Confirm -and $blockedFiles

Usage:

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

Powered by OneWebHelp