I Need To Make A Change With My IT Support! Call (225) 706-8414

Using Optional Parameters in a GFI MAX Check Script Causes the Script to Fail

You’ve written a script for GFI and, during normal testing, it works but when run from the GFI agent, it fails.

Solution

One possible reason for this is that the GFI agents adds additional arguments when running your script.

If you have optional parameters, your script may be treating one of the arguments GFI appends as an optional argument and responding incorrectly.

Most scripting languages have built-in argument-parsing functions that should be smart enough to handle this situation.  The obvious exception is DOS batch files (which haven’t qualified as “smart” for a couple of decades at least).  Thankfully, GFI is consistent in how it appends its args.  Once you see “-logfile”, that’s the start of GFI’s arguments.

 

Concerned About Cyber Attacks?

CLICK HERE >

Want to Migrate to the Cloud?

CLICK HERE >
Office 365

Ready to Experience Microsoft Office 365?

Want the latest IT news directly in your inbox? Subscribe now!