For a remediation script to execute properly you first must ensure it performs as expected outside of AppDynamics.
You must have a machine agent installed on the server where the script performs it's actions.
You place the script inside the local scripts folder
Path is: /local-scripts
You then put the name of the script inside the actions section of the Controller UI
Controller UI->Alert & Respond->Actions->Create->Select ''Remediation''->Name the script action->Put in the name of the script in the ''Relative path to script'' section.