Articles

PowerShell articles, tutorials, and guides from community experts.

June Blender

ValidateScript for Beginners

There"™s been a lot of chatter about in Scripting Games 2013 blog posts about the ValidateScript attribute. The chatter is, appropriately, confined to the advanced events ““ this sort of thing is not expected in a one-liner. But I thought I”™d take a minute and demystify it ““ and discuss an issue that it raises about when input should be rejected.
Let”™s start with a quick description of ValidateScript and its siblings. For help, see about_functions_advanced_parameters.

Don Jones
Scripting Games

Scripting Games Event 3 Winners

We’re pleased to announce the winners for Event 3 of The Scripting Games 2013!
Winners: You can log into The Scripting Games Web site and go to your Profile page to see your prize. You will be given a prize redemption code and either a URL where you can redeem it, or an e-mail address of the prize provider (they will need the redemption code). All prizes must be claimed by the end of July 2013. I will list winners by username; if you used your e-mail address as your username, then a portion of that will be truncated for your privacy. Anyone can log in and check their Profile page to see if they’ve won a prize.
Note: Our hosting company is doing some maintenance on their admin site, so it may be a day or two before redemption codes appear in your Scripting Games profile. Appreciate your patience.
And seriously, you’re killing me with the usernames. Heh.

Don Jones

Some Event 3 Notes

I didn’t see anyone (although I’ll admit I haven’t checked every entry) using my EnhancedHTML module from Creating HTML Reports in PowerShell. I am ensaddened.
But man, Event 3 shows that you can really do well by learning a wee bit of HTML. Knowing an H2 and HR tag makes for much pretty results. Take it as career advice.
As a nitpick, don’t use Convert as a function verb unless all the function is going to do is convert something. It shouldn’t “Get” as well. That said, because this event wants a single function that both gets and converts… which is something I’d ordinarily avoid packing into one function… no big. It’s interesting to see the function names folks picked out.
Folks, test your scripts. Seriously.
I kinda giggled when I saw this comment in an entry:

Don Jones
Scripting Games

Your Weekend Games Report

It’s been a crazy-busy week for me, so I’m just getting caught up here. I’m off observing the beta-teach of the new 10961A PowerShell 3 class in Phoenix next week, but I’ll be keeping an eye on the Games.
So let’s run some numbers.
The Games have 2092 users at present, along with 10960 scores and 5412 comments. There are 849 total entries.
Regarding Event 3, we have 109 Advanced entries and 122 Beginner entries. The average beginner score is 2.8416, and the advanced score is 2.8512. Darn close.
Site traffic is up to 25,000 visits from 18,200 unique visitors, for a total of 56,000 page views and a poo-load of bandwidth. I should have Event 3 winners posted on Tuesday sometime.

Don Jones
PowerShell for Admins

Meet the Scripting Games Judges: Olver Lipkau

I have been working for AtoS, formaly Siemens IT Solutions and Services, for 6 years as a IT Consultant.
I was 15 when I started scripting. First only batch scripts to automate simple things. With time the scriptt grew in complexity and languages. VBS, AutoIt, AHK and finally PowerShell, which superseeded all others. PowerShell became a passion and became more and more a daily thing.
I was invited to be a judge for the Scripting Games in 2011, 2012 and now 2013.
You are welcome to visit my Blog at http://oliver.lipkau.net/blog and check out what I have been up to.

Bartek Bielawski

Event 3: My notes…

I’m almost done judging event 3, perfect time to share few thoughts about things I’ve seen in this event. A lot of great entries, but still few things that could have been done (in my opinion) better. If you want to know my general opinion - you can read it either in English or in Polish. Enjoy!

Don Jones
Scripting Games

More Updates to the Scripting Games

I’ve been making some more programming changes to the Scripting Games, based on folks’ feedback. If you run into problems, please notify me via the Feedback Forums link at the bottom of every page on the site. Use the email address provided. Don’t post a comment here, because I might not see it quickly.

  • Multiple comments per reviewer - you can now leave multiple comments on an entry. Combined with the ability to mark your comment as pertaining to a line or range of lines, this should allow for more granular commenting.
  • Comment without voting - you are now free to offer comments without offering a score.
  • Delete comments - you can now delete the comments you have written.

I’m still plugging away at some IE9/10-related errors, which are causing the code reviewer/voter/commenter to not display on some entries. In the meantime, Safari, Chrome, and Firefox seem to be working fine.