Powershell Unblock All Files In - Folder
if (-not (Test-Path $FolderPath)) Write-Error "Folder does not exist: $FolderPath" exit 1
When you download a PowerShell script and see: powershell unblock all files in folder
if ($files.Count -eq 0) Write-Host "No files found in $FolderPath" exit powershell unblock all files in folder
Get-Item "C:\Downloads\file.ps1" -Stream * If Zone.Identifier appears, the file is blocked. powershell unblock all files in folder
$files | Unblock-File -WhatIf:$WhatIf