Add function to recursively unblock PowerShell files

This commit is contained in:
Lord Hepipud 2019-11-03 15:55:08 +01:00
parent e937195e16
commit f6f6acf9fc

View file

@ -0,0 +1,14 @@
function Unblock-IcingaPowerShellFiles()
{
param(
$Path
);
if ([string]::IsNullOrEmpty($Path)) {
Write-Host 'The specified directory was not found';
return;
}
Write-Host 'Unblocking Icinga PowerShell Files';
Get-ChildItem -Path $Path -Recurse | Unblock-File;
}