Recently another developer asked me how he can run a command line exe from a script on a FMP client. This is tricky as the client does not have direct access to the server command Line interface.
execCommand.php is a very simple PHP helper file that acts as a command proxy between your Filemaker Script and the Server OS command line. An authorize token key and a command line and argument is passed.
For his use, he wanted to run a server side print utility that would allow printing from a server connected printer. There are dozens of applications including polling system vars to starting and stopping services programatically.
Not all commands will run in a shell_Exec via PHP. You will have to experiment. Things that require user feedback or interaction will not function for example and the php file will wait and eventually timeout.
FileMaker Demo file here: https://www.dropbox.com/s/r8vln38tuva9irf/FM_HostExec.fmp12?dl=0
execCommand.php file here: https://github.com/DelfsEngineering/FM_execCommand