The script is available for download from https://gallery.technet.microsoft.com//How-to-extend-the-task-c23e0fe5. You can also use Microsoft Script Browser for Windows PowerShell ISE to download the sample with one button click from within your scripting environment.
This scripts shows how to extend the task sequence error time-out duration in System Center 2012 Configuration Manager SP1.
When you are creating new task sequences, it's not a big surprise that task sequence steps will cause exceptions. Since the whole deployment will last a very long time, you can easily miss the final summary report. By default, you have 15 minutes before the reference computer restarts. So you want to use a script to increase the time-out value by assigning a higher value for the SMSTSErrorDialogTimeout variable.
You can find more All-In-One Script Framework script samples at https://aka.ms/onescriptingallery