The 2011 Scripting Games Beginner Event 5: Use PowerShell to Collect Basic Computer Information

2011 Scripting Games badge

Summary: Beginner Event 5 uses Windows PowerShell to collect basic computer information.

About this event

Division

Beginner

Date of Event

4/8/2011 12:01 AM

Due Date

4/15/2011 12:01 AM

Event scenario

You need to collect the user name, computer name, domain name, and the operating system information from a number of computers. To make matters easier, you have decided to write the information to a text file. The text file needs to be saved as an ASCII file, and not as Unicode. You should include the date in which the information was gathered to determine the reliability of the information. A sample file output is shown in the following image.

Image of file output

Design points

  • Extra points for a script that will work on a remote machine
  • Extra points for a script that will accept a Text file, CSV, or other type of input of remote computer names
  • Extra points for adding useful Help information and comments
  • Design points for clear, easy-to-read code and for the use of native Windows PowerShell cmdlets

2011 Scripting Games links

2011 Scripting Games: All Links on One Page

Submit your scripts on PoshCode

Support our Sponsors!

I invite you to follow me on Twitter and Facebook. If you have any questions, send email to me at scripter@microsoft.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