mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-21 07:10:15 -05:00
Add function to recursively unblock PowerShell files
This commit is contained in:
parent
e937195e16
commit
f6f6acf9fc
1 changed files with 14 additions and 0 deletions
14
lib/core/framework/Unblock-IcingaPowerShellFiles.psm1
Normal file
14
lib/core/framework/Unblock-IcingaPowerShellFiles.psm1
Normal 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;
|
||||||
|
}
|
||||||
Loading…
Reference in a new issue