Just spent half-hour figuring out why PHP does not want to run shell_exec() command. Might as well write it down here for future reference.
Go to IIS -> Fast CGI settings:
FastCGI in IIS

There select your PHP application, click Edit on right hand side.
Then expand Advanced Settings and change protocol to TCP.

enter image description here

Save and DONE!

  • lizi

    omg thank you!! thank you!!

  • Evandro Simenes

    Your post saved my life. Thank you!

  • Dolphyn5

    Thanks, this solution appears to work on IIS 10.