June Blender

Explore articles and content from this author

June Blender

7 articles published

8 min read

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.

3 min read

A Helpful Message about HelpMessage

The Scripting Games 2013 winners have not yet been announced, but for the 3rd year running, I’m in the lead for the “Learned Most from the Scripting Games” award. I’m making space for the prize on my bookshelf. Seriously, I play with PowerShell all the time and read lots of blogs, but nothing compares to looking at dozens of scripts and commands and seeing how people do things in the real world.

2 min read

Placing Comment-Based Help

What an amazing event. I’m now reading through each of the Advanced entries in a vain attempt to whittle the entries down to a short list. It’s an incredibly difficult task, which is testament to your skill and diligence. We are so lucky to have so many competent scripters in the community. As I read through the comments on each script, I’ve noticed several that say: “Help should be nested under the function to work properly.

9 min read

Event #1: Moving Old Files

As a celebrity judge, I’m not required to blog ““ I’m just here for my good looks :> – but I’m having a great time reading the blogs posted by the Expert Judges about the Event #1 candidate solutions. Much of the judging is subjective, but I’ll add the criteria that I use to distinguish a working solution from a great solution. Before I do, though, I want to congratulate everyone who submitted an entry.

4 min read

How to Name Your Help Files

The first challenge of Scripting Games 2013 is complete! Honestly, you win by getting the experience of playing. I hope everyone is in there voting and writing really constructive comments. I’ll get over there in a minute, but I wanted to make sure that I got this information out to everyone before I get involved in voting. Everyone who writes shared Windows PowerShell cmdlets, functions, scripts, CIM commands, and workflows also writes help topics ““ or gets a friend or colleague to do it.

4 min read

Name that Property

Challenge #1 of Scripting Games 2013 is coming to a close. I can’t wait to see the results! I solved both the Beginner and Advanced versions just for practice and I learned a lot along the way. They’re not easy, but if you haven’t yet tried them, go for it. And be sure to review the candidate solutions for new techniques. In my last post, I showed a very easy way to create a custom object in Windows PowerShell 3.

6 min read

PSCustomObject: Save Puppies and Avoid Dead Ends

Welcome to Scripting Games 2013. Here’s my favorite hint for improving your functions and scripts. Avoid writing to the console or formatting your output. Instead use PSCustomObject in Windows PowerShell 3.0 and leave the formatting to the end user. Windows PowerShell provides lots of great ways to return the output of a command or function. You can write to the host program (Write-Host), write to a file (Out-File), and format your output to look really pretty (Format-*).