As part of the 2008 Winter Scripting Games the Script Center is profiling competitors who recorded a perfect score in the 2007 Scripting Games. Here, in his own words, is a little something about Simon Dalling, who received a perfect score in the Windows PowerShell Advanced Division.
Check out more Profiles in Perfection from the 2007 Scripting Games.

Simon Dalling is an Advanced Server Administrator for Electronic Data Systems Ltd., supporting around 3500 Wintel Servers and based in Tamworth, Staffordshire, UK. Simon had been working in a server support role for many (scriptless) years, when one day early in 2003, he discovered a book called the Microsoft Windows 2000 Scripting Guide (thanks, Greg). It was this book that changed his working life for the better, as it was written for administrators, allowing them to build step-by-step solutions to many common problems. Simon was soon clipping pieces of code together and selling his solutions through his employer.
Simon has been married for over 20 years and has two non-scripting sons. When Simon is not scripting, he is a keen amateur photographer and gardener and enjoys looking after a wide variety of fish and plants in his garden pond.
Simon Dalling’s Scripting Tips
| • | Never use a script from unofficial sources unless you fully understand it. There are scripters out there that have the other type of “Light Sabre” – the red one! |
| • | Build a library of scripts so you can rapidly search for solutions to similar problems. Always consider that someone else will have encountered the problem before and may have a simple solution. |
| • | Collect unofficial scripts in a separate quarantine area and rename them to .txt to prevent accidental execution. |
| • | Develop scripts on a test server or workstation that is similar to the live environment. This is particularly important if the script makes changes. Does your script cope with error conditions? Consider trapping all errors and writing them to a log file until you are satisfied that your script is fully working under all conditions – expected or otherwise. |
| • | Never assume that the person asking you to provide a solution appreciates the power of scripting or has a complete understanding of the problem. For example, if they ask to remove the accounts of all users who have not logged on for three months don’t immediately delete those accounts; after all, new users may not have had the chance to log on yet. Therefore, filter by creation date instead. |
| • | People don’t like change, so work with the end users and win their enthusiasm. Listen to their comments and try to accommodate them. At the very least make your script user-friendly and intuitive to use. |
| • | Work with other scripters when solving more complex problems. They will have alternative ideas and be able to look at it from a different angle. |
| • | Think outside the box. Some problems cannot be solved by scripts alone, so employ existing executable tools to assist. Some examples are Psexec, Filexcl, Subinacl, and Netsh. |
| • | Lastly, once you have a working solution consider its execution speed. For example, account for servers or workstations that are switched off by pinging them using "pingstatus" and "statuscode = 0" before linking to them using WMI. This can save you many minutes trying to interrogate a failed or inaccessible system. |