15 lines
307 B
PowerShell
15 lines
307 B
PowerShell
# Unlock all files in the specified directory
|
|
|
|
param ([string]$directoryPath)
|
|
|
|
if (Test-Path $directoryPath) {
|
|
$files = Get-ChildItem -Path $directoryPath
|
|
|
|
foreach ($file in $files) {
|
|
Unblock-File -Path $file.FullName
|
|
Write-Host "Unlocked: $($file.FullName)"
|
|
}
|
|
}
|
|
else {
|
|
Write-Host "Incorrect path"
|
|
} |