Creating check command with unnamed parameters

Any particular reason why you are not using the NSClient, which seems to be installed, to run the script?

For the “powershell way” keep in mind that the check will exit with an OK state if the script is not present.
At least that is what I experienced with a similar check: