How to call a Powershell Script via Command

Hi all,

so I have an issue with my Powershell Script. It is located under C:\Program Files\ICINGA2\sbin\check_users.ps1, as per this “Guide” a Person once wrote here > Windows PowerShell Checks with Icinga2 - Meta Icinga / Tutorials and Guides - Icinga Community

But I do all of that via the Director / Frontend. My Server is an Windows Server with the Icinga2 Agent already installed and running.

I have the following Configuration:

Yet the output is the following:

And I do honestly not know, how to fix it.

The Script itself looks like this:

Any help is highly appreciated!

Sincerly,
MusicBoy

Small Update, as I adapted the Argument Values to this:

With now having the following output:

I adapted the Output Text. My fault, I do have figured it out myself. The Check is now working as intended!