diff --git a/lib/core/framework/Unblock-IcingaPowerShellFiles.psm1 b/lib/core/framework/Unblock-IcingaPowerShellFiles.psm1 new file mode 100644 index 0000000..9f6ef5c --- /dev/null +++ b/lib/core/framework/Unblock-IcingaPowerShellFiles.psm1 @@ -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; +}