Powershell Unblock All Files In Folder — [top]

Get-ChildItem "C:\Downloads" -File | ForEach-Object Remove-Item -LiteralPath $_.FullName -Stream Zone.Identifier -ErrorAction SilentlyContinue

.\Unblock-Folder.ps1 -FolderPath "C:\MyFolder" -Recurse Before unblocking, check if a file has the Zone.Identifier stream: powershell unblock all files in folder

param( [Parameter(Mandatory=$true)] [string]$FolderPath, [switch]$Recurse, powershell unblock all files in folder

[switch]$WhatIf )

Write-Host "Unblock operation completed on $($files.Count) files." powershell unblock all files in folder

Similar Posts