Learn about Windows PowerShell
Summary: Use Windows PowerShell to collect performance information.
At first glance, Beginner Event 10 appears almost impossible. I mean, like, "Oh my!" I do not know much about performance counter stuff at all. Well, I am not an IT Pro, but I do enjoy messing around with Windows PowerShell, so why am I being punished with this event? Then when we were at the SQL Saturday, I heard one of the speakers going on and on about collecting performance counter stuff, and his code looked really complicated. Next I heard one of our friends from the Windows PowerShell User Group talking about how easy it is to use Windows PowerShell to collect performance information, and I was immediately intrigued.
So I went to the 2012 Scripting Games All Links on One Page, and I looked at the study guides for the 2012 Scripting Games, the 2011 Scripting Games, and the 2010 Scripting Games, and you know what? Goose eggs! Zip. Nothing! So immediately I was a bit miffed. So I hunted down the Scripting Guy and said, “Hey, why is there nothing about performance counters in the study guide?”
He said, “I can’t give you all the answers. Besides, this is the last event, so you need to do a little work.” Of course that was my goal, to do only a little work.
Next, I went to the Hey, Scripting Guy! Blog, and I used the search box on the right side of the blog. I typed in the words “performance counter” and got back several pages of hits. I found what I needed on the first page because there are blogs about using Windows PowerShell to do performance monitoring and to simplify collecting performance information. I should not be surprised that all the information is there on the Hey, Scripting Guy! Blog.
When I found out how to get performance counter information, I wrote my script and uploaded it. Unfortunately, I uploaded it too soon because when I went back over the requirements (when I was getting ready to write this), I noticed that I was supposed to write to a file in the Documents folder. Bummer! So, if you have not already uploaded your Event 10 script, make sure that you also do a search on the Hey, Scripting Guy! Blog for documents. You will find a blog called The Easy Way to Use PowerShell to Work with Special Folders. You will NEED this information…hint, hint, hint.
Well, this is it for me. The 2012 Scripting Games are really over for me now. I will sit back and watch the leaderboards to see who comes in first in the Advanced and the Beginner categories. I hope the winners will get to come to Microsoft TechEd 2012 because I will be at TechEd with Ed at the Scripting Guys booth. I also heard Ed recording his podcast with Microsoft IT Pro evangelist, Blain Barton, and they are planning to do a special interview with the winners for the June TechNet radio podcast. (You can find all of the back episodes Ed has done with Blain on the Scripting with Windows PowerShell page, in addition to two video series and a couple of Windows PowerShell quizzes).
It will be so cool…so good luck to everyone.
So a reminder from scripting wife, after doing your code - read the instructions again. Then test again.