This script is to execute any windows command or PowerShell command and append the output in a shared file from the valid network path
Modify the lines of code for your requirement. they can be done after exporting the script file attached to this message
This script run as "system User"
This script should be run as System User.