icinga-powershell-framework/core/include/Utils.ps1
2018-11-06 17:14:49 +01:00

12 lines
No EOL
323 B
PowerShell

# Provide a collection of utility functions for the module
[hashtable]$Utils = @{};
Get-ChildItem (Join-Path -Path $PSScriptRoot -ChildPath '\utils\') -Filter *.ps1 |
Foreach-Object {
$path = $_.FullName;
$name = $_.Name.Replace('.ps1', '');
$Utils.Add($name, (& $path));
}
return $Utils;