Summary: The deadline for grading submissions to the 2012 Scripting Games is extended
Due to overwhelming level of participation, the deadline for judges to complete grading scripts submitted to the 2012 Scripting Games is extended to April 30, 2012 at 12:01 AM Pacific Standard Time. The reason for extending the deadline is to provide judges with more time to grade the script submissions. Submissions are currently at 120 percent the number received last year, and this has overwhelmed the judges. Several of the judges have requested the extension to provide more time to grade the scripts. The one thing we do not want to do is to rush the judges – in fact, we want them to take the amount of time grading the scripts as they feel they should. To this end, I decided to extend their deadline by one week.
Now, this does not mean that contestants have any additional time – in fact they do not. The last script submission deadline is April 20, 2012 at 12:01 AM PST – the judges are the only ones getting a reprieve this year.
Once all the scripts are graded, the final leaderboard will be displayed. The final leaderboard will determine the final standing for the 2012 Scripting Games. This leaderboard will display on Tuesday May 1, 2012. So stay tuned … the competition is really heating up.
Ed Wilson
Microsoft Scripting Guy
Currently rated 1.5 by 59 people
Tags:
Summary: Use PowerShell to collect performance information
At first glance, beginner event 10 appears nearly 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 PowerShell user group talking about how easy it really is to use PowerShell to collect performance information, and I was immediately intrigued.
So I went to the 2012 Scripting Games all in one page, and I looked at the study guide 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, and so I hunted down the Scripting Guy and said “hey, why is there nothing about performance counters in the study guide,” and 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 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 articles about using 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.
Once 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 mydocuments folder. Bummer! So, if you have not already uploaded your event 10 script, make sure you also do a search on the Hey Scripting Guy blog for mydocuments. You will find an article 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 and see who comes in first in the Advanced and in the Beginner categories. I hope the winners will get to come to 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 on doing 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 Learn PowerShell page as well as two video series and a couple of PowerShell quizzes).
It will be so cool … so good luck to everyone.
Currently rated 1.5 by 2 people
I was going to write this tomorrow, but then I am going to meet up with some friends for breakfast, and shopping so I will get my hints completed today. I was up rather late last night finishing writing all of my entries for all the events, then I got them submitted this morning – I am officially finished with the 2012 Scripting Games. I am looking forward to seeing what the experts did with my events. I liked Dr. Thomas Lee’s write up – probably because his solution looked a lot like the solution I submitted. I guess that is a big part of learning from the games – seeing what others did and comparing it with your own work.
I did not think that beginner event 9 was too complicated. The hardest part of the event occurred if you did not actually have an event 10001 entry on your computer. I did, and therefore I had no problem. Luckily, DavidW posted a comment on Beginner event 9 that told how to generate a 10001 error message. He said to restart the computer while notepad was running, when the computer asks you if you want to save your data, hit cancel and then tell the computer to do a force quit. Once you do this, you should get the error message.
Searching an event log log for the 10001 event log entry was not too hard. I sent the results to the Format-List with a * and the –force parameter so I could look at information that was returned. This helped me to find the property that contained the information about applications that are attempting to veto the shutdown.
I hope this helps.
Currently rated 1.5 by 16 people
powershell | scripting
We just returned home from the SQL Saturday event in Atlanta. It was a great time, but it kept me busy. Just prior to the speakers dinner we met up with a couple of people from the Charlotte PowerShell Users Group. It was really fun going off to another city and still seeing some of your friends from where you live. I guess you could say that the Charlotte PowerShell Users Group supported SQL Saturday in Atlanta in a big way – in fact two of our members were speakers during the PowerShell track they had. Of course, one of those was the Script Monkey (aka. Ed Wilson) but the other speaker from Charlotte was Jim Christopher who is a PowerShell MVP. All this is to let you know why I am slow in writing my tips for event 8.
Ok, this one sounds confusing. In fact it sounds like there are conflicting requirements. How can I return a yes or no from the script but also return a bunch of other information. I will admit I had to ask Ed what he had in mind. He told me that he was thinking someone might want to write a script with two functions in it. One function returns the true / false (yes or no) if the computer is a laptop, and the other function returns the inventory information (such as the computer name and that kind of stuff). I think it is a bit hard, but it can be done.
Once he clarified that, it was not too hard. For the purpose of the task I assumed we have either a desktop (tower or whatever) or a laptop. All types of portables, laptops, tablets, anything like that is a laptop for the scenario. There is a property in WMI that will tell you what type of computer you have.
Well that is all for now. I hope this helps.
Be the first to rate this post
Summary: The Scripting Wife details her experience in creating a script for beginner event 7 in the 2012 Scripting Games.
I will tell you what, sometimes I wonder about that Script Monkey … actually it is more than just sometimes. I thought this event was just a wee bit too hard. My score will probably drop several notches. Right now I am in 21st position (not that it matters because I am ineligible for anything) but it is kind of cool. What is more cool is that only 1.5 points separate #1 from #28. I know, however, after my entry for this event factors in, I will no longer be in 21st position. Oh well.
So what was my problem? I could not figure out how to get hidden event logs. Getting enabled event logs that have more than 0 records is not too hard. I needed to create a compound where clause and look for records that are enabled and that have more than 0 records. This type of where clause is a little tricky, but I used it in an earlier event when we were looking for running services that could also stop. If you missed that, you may want to look at some other people (who got good scores) entries. You may also want to look at some of the judges blogs (I talked about them in the 2012 Scripting Games blog roll article) because I remember seeing a blog article by Don Jones where he talked doing a compound where clause. He gave a great example.
After that sorting it, I picked up the two properties I needed and formatted it as a table. By the way, you might want to look at the Weekend Scripter: Troubleshooting Windows Hey Scripting Guy blog article. It gave me several things to think about as I worked on my solution.
I guess maybe it was not really too hard, I will see when I get my score.
I hope you are doing well in the 2012 Scripting Games. Oh, by the way, if you are going to be in Atlanta on Saturday April 14, 2012 the Scripting Guy and I will be at the SQL Saturday #111 at the Georgia State University in Alpharetta. Hope to see you there.
Happy Scripting,
Scripting Wife.
Currently rated 1.8 by 11 people
Summary: The Scripting Wife reveals the blogs she has been reading to stay current for the 2012 Scripting Games
Good afternoon,
I had some free time this afternoon and wanted to say a few words about the 2012 Scripting Games.
This seems like a Grammy Award Speech, but seriously, who do I thank first, the Fans( the Windows PowerShell community) the Songwriters ( the expert commentators) the Musicians (the participants in the Scripting Games) the Judges (speaks for itself) the Sponsors ( also speaks for itself)? Oh wait I left one out (the Media) certainly does not need any explanation. Without further ado, (drumroll please....) THANK YOU for all you do to make the 2012 Scripting Games a success.
This also got me to thinking about the Media portion. I have been seeing tweets about different judges who are writing blog posts about what they are seeing in the submissions. I thought maybe you would like to have a blog roll for that list. (I would rather have a yeast roll especially today while I am on this low carbohydrate diet, but I would not rather have anything else to top this list.) As always I am afraid I will omit someone by sheer forgetfulness... that is your cue to gently remind me or smack me in the head if I have left you out and we will go back and edit this post.
Here are the judges from the 2012 Scripting Games who have been writing about their experiences in grading the hundreds of scripts. In addition to the posts by the Scripting Guy, you should also check out these blogs.
Jeffery Hicks
Don Jones
Richard Siddaway
Thomas Lee
Boe Prox
Thanks again to everyone we exist in an awesome PowerShell community.
Scripting Wife
Currently rated 5.0 by 1 people
Tags: 2012 scripting games
We will send you email with the pertinent information about your prize in the next few days. Thank you for entering the 2012 Scripting Games. A special thank you to our wonderful sponsors for making these prizes possible. Please be sure to visit the sponsors page for more information about these awesome companies.
Summary: The Scripting Wife provides tips and hints for the 2012 Scripting Games Beginner event 6.
Well, these past couple of days Ed has been tied up, so I have free reign of the house. This means I have a lot of projects I want to complete. For some reason, when he is around, it seems like he often gets under foot – a situation especially problematic when I have a detailed game plan. Anyway, this means I am up early so I can maximize my time. I completed beginner event 6 and want to provide you with some good hints.
First of all, this is the most difficult event (at least for me) so far of the 2012 Scripting Games (on the beginner track). This means that you should take your time, and it also means you will probably need to do some research before writing your script.
The first thing I needed to do was to find what property would tell me when the server would boot. I used the Get-WMIObject cmdlet and piped the results from the WMI class the boss told me to use to Get-Member. It did not take very long at all to find the property I needed. I then needed to change the format of that date value.
One of the things you will need to know how to do is to convert a WMI date into something more usable. I looked at all of the date articles listed in the study guide for the 2012 Scripting Games and did not really find what I was wanted. But I then did a search (using the search this blog feature on the Hey Scripting Guy blog) and I was able to find exactly the information I needed. The exact search words I used was wmi date and it returned several hits. The one I needed was the second one called Manipulating Dates Returned by Windows Management Instrumentation (WMI).
The next thing I had to look up was was how to compute the amount of time between two dates. I did find this in the date section of the 2011 Scripting Games Study Guide … come to find out it was a Scripting Wife article … oh yeah, I remember that now.
The last part, formatting the output required me to mess around with substituting values for parameters. This can get a little tricky, but there are lots of ways to get the same result.
Hope this helps. Remember, you have until 12:01 AM on April 16, 2012 (-8 Pacific time) (or basically midnight on the night of April 15, 2012) to submit your entry. This one would definitely be a good one to set aside and come back to later. Good luck, and happy scripting.
Currently rated 2.7 by 3 people
Summary: Microsoft Scripting Guy Ed Wilson provides a look from inside the trenches about how the 2012 Scripting Games are progressing.
Wow! That is about all I have got to say. Perhaps that is because I am struggling to catch my breath. How are the 2012 Scripting Games going so far this year? Well from a numbers perspective, we are seeing a significant increase in participation. In fact, for event 1 (for which submission closed at 12:01 AM Redmond Time on April 9, 2012) we have seen an increase of over 50 percent. For the advanced event 1 we saw an increase of over 150 percent! Clearly there is both an increased interest in the Scripting Games, but perhaps more importantly, this also indicates an increase in interest in the awesome technology called Windows PowerShell.
How about the scripts themselves. There is another thing that is really cool – or maybe more important - the increase in scores. As a judge who has already graded literally hundreds of scripts this past week, I can tell you the increase in scores is NOT due to grade inflation. It is a result of superior scripts being submitted in both categories. In fact, the average grades in the advanced category increased by 33 percent – clearly an awesome achievement. But perhaps more exciting is that the average grade in the beginner category (a category clearly aimed at beginners with no scripting experience) increased by 58 percent!
These two points: the dramatic increase in the participation in the 2012 Scripting Games, and the dramatic increase in the quality of scripts submitted tell me that Windows PowerShell is becoming a mature and established technology that is being rapidly adopted by IT Pros. But besides merely adopting the technology they are embracing it, and are becoming increasingly proficient with this technology.
Cool. Very Cool indeed.
Well I don’t know about where you live, but it is an absolutely perfect day today in Charlotte, North Carolina. I hope you are enjoying the 2012 Scripting Games, and that you are finding them both challenging and fun. That is, at least so far, the way I would describe it. The Beginner Event 5 was not too bad. My solution ended up being a one line command. There are several keys to understanding this particular event. In fact, it seems that most of the design points are expressed as negatives. But before we get to that, let me tell you that we are dealing with the classic type of event logs. Not just the big three (System, Security and Application) but any event log that is created using the old fashioned type of technology. This should tell you something about which cmdlet will be easiest to use. If not, then use the Get-Command cmdlet and look for something that has a noun that looks like it has to do with event logs. Next, use the Get-Help cmdlet to see if the cmdlet you discovered reads the classic event logs, or not. Now to the details.
1. The design points say the cmdlet should have the ability to run against a remote computer, but that you not need to do this for the scenario. So as long as the cmdlet supports targeting a remote computer everything is cool.
2. I do not need to check for admin rights.
3. I do not need to be long, involved, or complicated.
4. I do not need to add comment based help.
So what do I have to actually do?
1. I need to use standard Windows PowerShell cmdlets.
2. I need to sort the output so that the largest number of errors appears on the top of the list (note that the picture in article does not do that).
3. I need to be able to redirect the output to a file (I do not have to actually do this, but the output SHOULD actually write to a text file if I do in fact redirect the output. This requirement should tell you specific things about how the script can and can not be written).
4. I need to write simple, straight forward code.
So at the end of looking at this, we have a list of things points that will be subtracted from my script total if anything is missing, or if I do something I should not do. For each violation, expect to lose one point.
Well, best of luck to you. I am going to go outside and enjoy the beautiful Charlotte weather (before it gets too hot and humid).
Currently rated 3.5 by 2 people