The problem with OS Scripts is they are hard to troubleshoot if they fail as you need to look into the log files to see what went wrong. OS Scripts run through the custjob engine so look for files starting wiht "CJ -*****.log" on your core server.
What I would suggest is forget about OS Scripts and go straight to provisioning as this is much more robust and flexible. It is a steep learning curve but once you get going is 100% better. Below is a link that will get you started.