2012 Scripting Games Advanced Event 1: Review a Coworker’s Script
Summary: Advanced Event 1 of the 2012 Scripting Games asks you to review a coworker’s script.
About this event
Date of Event
4/2/2012 12:01 AM
4/9/2012 12:01 AM
You work as a network administrator for a large company. You are part of a team of other network administrators that monitor several mission critical applications. Your coworker has convinced your boss that he knows everything about Windows PowerShell. As a result, whenever any scripting needs to be done, he always gets the nod. Recently, however, your boss has begun to have some doubts, and the boss has asked you to do a code review of the script that is shown here:
$notepad = Get-Process notepad
for ($i = 1 ; $i -le 10 ; $i++)
When you run the script, you receive the output that is shown here:
- If no changes are required to the script, put “No changes” in your entry for this event.
- If changes are required:
- Make the minimum number of changes to the script. Points will be deducted if you make too many changes.
- Consider the performance of the script when you make changes.
2012 Scripting Games links
I invite you to follow me on Twitter and Facebook. If you have any questions, send email to me at email@example.com, or post your questions on the Official Scripting Guys Forum. Good luck as you compete in this year’s Scripting Games. We wish you well.
Ed Wilson, Microsoft Scripting Guy