Summary: Advanced Event 3 of the 2012 Scripting Games challenges you to create a log file that appends each time a person logs on to the network.
About this event
Date of Event
4/4/2012 12:01 AM
4/11/2012 12:01 AM
You are “the scripting guy” at your small single location business. As a matter of fact, you are also “the Exchange Server guy,” “The AD guy,” and “The WSUS guy.” In short, you seem to do it all. The IT department consists of the CIO, you, and a Help Desk person. All servers are running Windows Server 2008 R2, and all workstations (except the IT department) are running Windows 7 Enterprise edition. About half of the workstations are running a 32-bit operating system, and the other half are running a 64-bit operating system. All of the workstations are running the 32-bit version of Microsoft Office 2010. The IT department staff (you, the Help Desk person, and the CIO) are running a beta version of Windows 8 on your client computers with a beta version of Office 2012.
Your boss, (aka, the CIO) has decided that she would like the Help Desk person to have a log that updates each time a person logs on to the network. The log, named logonstatus.txt should be stored in a folder off the root named logonlog. This file should append (the latest entries will be at the bottom of the log file) each time the user logs on. Therefore, if a user logs on to the computer 12 times in one day, there will be 12 entries in the log. Here is a list of things the CIO has mandated MUST be in the log file:
- The user name in domainname/username format, for example: Microsoft/EdWilson
- The computer name in hostname.domainname format, for example: Mred.Microsoft.Com
- Operating system version
- Service Pack level
- All mapped drives and path to mapped resources
- The default printer
- The last reboot of the computer
- The type of boot up (for example, safemode or normal)
The image shown here illustrates an acceptable output for the file.
- For the purpose of this exercise, we are looking for a specific file name in a specific location.
- The file must append. Do not overwrite the file on each log on or you will lose a point. The history aspect of the file is important to the scenario.
- You must include all eight pieces of information in the file. If you miss information, you will lose points.
- Neatness counts. The information presented must be accurate and easy to read by humans. Therefore, outputting as a .csv, .tsv, or .xml file will not gain extra points. In fact, because they are not very humanly readable, you will lose points for such output. The idea here is that a Help Desk person will open the file and read it.
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