New Icinga Powershell Check

Hi I have a new Powershell check that is intended to check our windows cluster service for a Roles and the owner. Just to verify that it is running on the intended primary server.

I created a new plugin with:
New-IcingaForWindowsComponent -Name ‘ClusterPreferred’ -ComponentType ‘plugins’

I modifed and extended the plugin with a new check:
function Invoke-IcingaCheckClusterpreferred()

When we test it locally with:
it returns as expected:

PS C:\Users\XXXXXXX> Import-Module ‘C:\Program Files\WindowsPowerShell\Modules\icinga-powershell-ClusterPreferred\icin
PS C:\Users\XXXXXXX> Invoke-IcingaCheckClusterpreferred
| ‘default::ifw_clusterpreferred::FAKESERVER01’=;;

The export for the Director works:

PS C:\Users\XXXXXXX> Get-IcingaCheckCommandConfig -CheckName ‘Invoke-IcingaCheckClusterpreferred’ -OutDirectory ‘C:\te
[Notice]: The following commands were exported:
[Notice]: - ‘Invoke-IcingaCheckClusterpreferred’
[Notice]: JSON export created in ‘C:\temp\PowerShell_CheckCommands_12-05-2023-14-08-4489.json’
[Warning]: By using this generated check command configuration you will require the Icinga PowerShell Framework 1.4.0 or
later to be installed on ALL monitored machines!


Use-Icinga; Invoke-IcingaCheckClusterpreferred;
Fails with not found.

The new check within the director also fails (as expected as it fails with the manual import-module first)

Did I miss a step in the documentation on including it in the path?
the psd1 was updated to include the invoke:

FunctionsToExport = @(

Which I assume is working, as I would expect Get-IcingaCheckCommandConfig to fail otherwise.

I have another 8 Powershell plugins ready, but somehow I feel I must have skipped or missed a step on why the framework is not grabbing them,

Thanks for any hints/tips

In case anyone else runs into this headache:

Do a search for Publish-IcingaForWindowsComponent

The Docs here are a bit wanting, as this command is listed in General, but not referenced with the New-IcingaCheck documentations, not does it have its own section on the left hand menu ( which would help alot).