Summary: The 2012 Windows PowerShell Scripting Games Study Guide is a great resource that points to important sources for learning Windows PowerShell.
Microsoft Scripting Guy, Ed Wilson, is here. The 2012 Scripting Games happen April 2 – April 13, 2012, and they will test skills that are commonly required by IT pros in their day-to-day working activities. This year, you will have a choice to compete using Windows PowerShell 2.0 or the beta of Windows PowerShell 3.0. If you choose to use the beta, please ensure you are using the most current build available. All of the scenarios will work with a single computer, and they will not require access to server types of resources.
More important than competing online and receiving prizes and a certificate is the acquisition of new Windows PowerShell skills. The ten areas emphasized in this year’s games represent “bread and butter” type of knowledge that you will be able to use immediately. To this end, I hope that you will use this study guide, even if you do not participate in the games.
Note Remember the Scripting with Windows PowerShell page in the Microsoft Script Center. It points to lots of great resources including podcasts, webcasts, and even a Windows PowerShell quiz.
Working with computer hardware
Not a day goes by that the IT pro must find out something about some computer somewhere. In general, working with hardware means using WMI. I have written extensively about using Windows PowerShell and WMI, and I even created a helper module to assist in exploring WMI, finding WMI classes, and other stuff like that. You can review these five pages of links to find topics that are of interest to you: Windows PowerShell and WMI
A good overview blog is the Use PowerShell to Simplify Access to WMI Data written by Microsoft PowerShell MVP, Richard Siddaway.
Another blog with good basic information is How Can I Use WMI with Windows PowerShell?
Working with dates
Working with dates used to be a major pain in other scripting languages. But in Windows PowerShell, it is super simple. Never-the-less, I have written quite a few blogs about working with dates. The following list of blogs explore essential tasks such as formatting dates and working with culture settings: Using Windows PowerShell to work with dates.
A good basic introductory blog is Using Windows PowerShell to Work with Dates.
Another basic admin task is working with date ranges. There is a good Scripting Wife blog, Scripting Wife Uses PowerShell to Get Days until NCAA Final Four, which explains the basics of time spans.
Working with ETW logs
Event Tracing for Windows (ETW) logs are the primary way that the Windows operating system logs diagnostic and tracing information. Using Windows PowerShell to work with these logs opens new avenues for exploration for the harried network administrator or developer who is tracing problems with applications. I wrote a great introductory Weekend Scripter blog: Using PowerShell to Troubleshoot Windows.
For other Hey, Scripting Guy! Blogs about this topic, see:
- Use Date Types to Filter Trace Logs in PowerShell
- Parse Windows Trace Logs by Using Windows PowerShell
- Automatically Enable and Disable Trace Logs Using Windows PowerShell
- Use PowerShell to Troubleshoot Software Installation
Working with XML
I have written several Hey, Scripting Guy! blogs about XML. There are in fact, three very good introductory blogs:
- Is There and Easier Way to Work With XML Files?
- Use PowerShell to Simplify Working with XML Data: A great tutorial written by Microsoft PowerShell MVP, Doug Finke
- Easily Explore XML Files with PowerShell, written by Microsoft PowerShell MVP (and honorary Scripting Guy) Sean Kearney
Also refer to this list of Hey, Scripting Guy! blogs as great resources:
Windows PowerShell and XML blog posts
Some are more special purpose, such as Use PowerShell to Parse XML Exchange Audit Results, but the list is definitely worth a look.
Working with classic event logs
It should go without saying that event logs are important to network admins. But they are also important to devs and regular Windows users. There are two cmdlets to use with classic event logs: Get-EventLog and Get-WinEvent.
I have written a lot of blogs about event logs. You should definitely review this collection because there is some great information: Using PowerShell to work with event logs
Two great blogs to begin with are:
- How Can I Check My Event Logs?
- The Scripting Wife Uses Windows PowerShell to Read from the Windows Event Log
For blogs that are more specific, see:
- Troubleshoot Outlook Issues with Windows PowerShell
- How to Improve the Performance of a PowerShell Event Log Query
Working with CSV files
Every time I write a new blog about using Windows PowerShell to work with CSV files, I am amazed at how easy it is to do. As it turns out, I have written quite a few blogs that provide very good information about this crucial topic: Windows PowerShell and CSV files
A great blog to begin with is Use PowerShell to Work with CSV Formatted Text.
Also check out these great blogs about working with CSV files:
- Four Easy Ways to Import CSV Files to SQL Server with PowerShell written by Microsoft Windows PowerShell MVP, Chad Miller
- Use PowerShell to Automatically Create a CSV File
- Use PowerShell to Append CSV Files Easily
Working with folders
Working with folders is foundational. It does not matter what one’s occupation is—nearly everyone needs to be able to create folders to organize files. Using Windows PowerShell to do this is choice. I have written quite a few blogs that talk about working with folders, as represented in this list: Working with folders
- You might want to begin with: How Can I work with Directories, Files, and Folders by Using Windows PowerShell?
- You will also find information about automatically creating folders and how to Easily Compare Two Folders by Using PowerShell
- For a good blog about working with special folders, see The Scripting Wife Works with Special Folders
For information about using Windows PowerShell to find folder size, check out:
- How Can I Determine Folder Size
- Can I Determine Which Folders are Using the Most Space on My Computer?
Working with text files
- Some of the blogs are esoteric, such as Avoid Blank Lines at End of a Text File with PowerShell.
- Others are more utilitarian, such as Use a PowerShell Cmdlet to Count Files, Words, and Lines.
At the most basic level, one needs to know how to take output from within Windows PowerShell and create a file from it. The Scripting Wife learned how to do that in The Scripting Wife Redirects Output and Creates a Text File.
Working with text files might also involve the tasks discussed in these blogs:
- Use an Easy PowerShell Command to Search Files for Information
- Scripting Wife Uses PowerShell to Create Files Automatically
- How Can I Use Windows PowerShell to Replace Characters in a Text File?
Working with services
Services make computers easy to use. They can also add complexity and open potential security issues. This is why it is important to know how to manage services. Luckily, Windows PowerShell makes working with services easy. I have written quite a few blogs about working with services (some of these blogs were also written by the community).
You will find blogs about:
- How Can I Use Windows PowerShell to Start a Service on a Remote Computer?
- How Can I Easily Reconfigure Services?
- What's Going on in the Service Host Process?
- Use a PowerShell Script to Start Non-Running Automatic Services
(This is a guest blog by Karl Mitschke who is an IT veteran with over 20 years of experience.)
The following blogs touch on two other important areas for working with services:
- Use Windows PowerShell to Display Service Dependencies
- Using Windows PowerShell to Determine Service Launch Order
Working with processes
Everyone needs to know how to work with processes. Process management is an important topic, and as a result, there are quite a few blogs on the Hey, Scripting Guy! Blog that deal with it. You can learn more about working with processes in these blogs:
- The Scripting Wife Learns How to Start and Stop Processes
- Use PowerShell to Compare Two Snapshots of Running Processes
You might also need to know how to Use .NET Framework Classes to Explore Windows PowerShell Processes.
I invite you to follow me on Twitter and Facebook. If you have any questions, send email to me at firstname.lastname@example.org, or post your questions on the Official Scripting Guys Forum. See you tomorrow. Until then, peace.
Ed Wilson, Microsoft Scripting Guy