Ed Wilson: Lessons learned from testing 200 scripts
I recently finished writing all 200 Windows PowerShell scripts for the Windows 7 Resource Kit. When I turned them in, the lead author Mitch Tulloch, tested them and wrote up a detailed analysis of each script. Keep in mind that prior to turning in the scripts I had tested them and I had a peer test the scripts as well. While I expected to see a few comments such as “this error message could be clearer” or “it would be better if the output were formatted in this manner” I did not expect to see as many errors as Mitch reported back to me. Some of the things I found out that I had not checked are listed here.
- The status of the Windows Firewall
- Whether the script is run in the Windows PowerShell Console or if it is run in the Integrated Scripting Environment
- Is the computer in a domain environment or is it in a workgroup
- What is the version of the operating system the script is run upon
Here are some things that I did check when I was testing the scripts:
- Is the script running as a normal user, or elevated
- Is the required module loaded
- What is the version of Windows PowerShell that is running
- Is the targeted remote computer available
- Is a required parameter supplied