From e4ccd950bb92a16ca32717bf8594a0903797950c Mon Sep 17 00:00:00 2001 From: Lord Hepipud Date: Sun, 3 Nov 2019 11:59:08 +0100 Subject: [PATCH] Add support to autoload plugins Icinga Plugin repo --- icinga-powershell-framework.psm1 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/icinga-powershell-framework.psm1 b/icinga-powershell-framework.psm1 index cb5181f..2818aa0 100644 --- a/icinga-powershell-framework.psm1 +++ b/icinga-powershell-framework.psm1 @@ -16,6 +16,12 @@ function Use-Icinga() [switch]$Daemon = $FALSE ); + # Ensure we autoload the Icinga Plugin collection, provided by the external + # module 'icinga-powershell-plugins' + if (Get-Command 'Use-IcingaPlugins' -ErrorAction SilentlyContinue) { + Use-IcingaPlugins; + } + # This function will allow us to load this entire module including possible # actions, making it available within our shell environment # First load our custom modules