diff --git a/lib/core/tools/Test-IcingaFunction.psm1 b/lib/core/tools/Test-IcingaFunction.psm1 new file mode 100644 index 0000000..9de4777 --- /dev/null +++ b/lib/core/tools/Test-IcingaFunction.psm1 @@ -0,0 +1,16 @@ +function Test-IcingaFunction() +{ + param( + [string]$Name + ); + + if ([string]::IsNullOrEmpty($Name)) { + return $FALSE; + } + + if (Get-Command $Name -ErrorAction SilentlyContinue) { + return $TRUE; + } + + return $FALSE; +}