Articles

PowerShell articles, tutorials, and guides from community experts.

Don Jones
Scripting Games

Scripting Games Winter 2014 Notice

Due to some vagaries in the system, we have some users who “belong” to multiple teams.
I think I’ve corrected the problem so it won’t crop up again.
A couple of players’ team memberships were manually reduced to 1. If it was you, and you’re suddenly on the wrong team, post in the forum and I’ll fix it for you.
For everyone else, when you go to the event list you may be redirected to a “You’re on multiple teams” page, and asked to click the team you wish to remain on. Your “join date” will not change, so you’ll still be able to participate in the events. You’ll simply be de-listed from the other teams.
As always, post in the forums if you need help.

Don Jones
Scripting Games

Scripting Games Winter 2014 – Practice Event Rules

On Monday, our practice event should be open at http://ScriptingGames.org.
**If you formed a team but only have one player on Monday morning, you will not be able to submit entries. **I’ve noticed several folks who have only a single player but who have set their team membership to “private,” meaning nobody can join you unless you provide them with your invitation code.
**Your team must have 2-6 players to participate in the Games. ** You may consider leaving your team (it’ll be deleted if you’re the last player in it) and joining one of the public teams. Once you join a new team, you will not be able to fully participate until the current, in-progress event is over and the next event begins.

Mike F Robbins
Scripting Games

PowerShell Tip #1 from the Winner of the Advanced Category in the 2013 Scripting Games

In case you haven’t heard, the 2014 Winter Scripting Games are just now getting started. Regardless of your skill level with PowerShell, it couldn’t be a better time to participate since this is the first time in the history of the scripting games that you’ll be able to work as part of a team and receive proactive feedback (before your code is judged) from a team of expert coaches who use PowerShell in the real world on a daily basis. Ultimately, the scripting games make learning PowerShell more interesting and challenging while giving you the opportunity to network with other enthusiasts in the industry.
Now it’s time to talk about a PowerShell tip that I wanted to share.
Tip #1 - Read the Help!
While this may not be the most popular tip, believe it or not, it’s one of the most important and it’s something that’s so simple it’s often times overlooked. In my opinion, you’ll never truly be effective with PowerShell and be able to figure things out for yourself until you learn to read the help.
Click here to be redirected to the original post of this article on the author’s blog site where you can read the remainder of the article.
µ

Don Jones
Scripting Games

Winter Scripting Games Team Formation in Full Swing

It looks like Team Formation is in full swing, with more than a dozen teams already registered for The Scripting Games: Winter 2014.
Some team tips:

  • If you create a new team, we’re assigning it a default team name. You can immediately change that.
  • Teams start as public, but we’re allowing you to make them private. This removed the team from the “join up” list, and gives you an invite code. You can distribute that invite to anyone you wish to join your team, and they can use it to sign up.
  • The public team list shows a time zone offset. This is kind of the average number of minutes between you and the other people on the team. So basically, lower numbers means you’re all closer to the same time zone. You don’t necessarily NEED to be close; it depends on how you all plan to collaborate.

Right now, we have about a half-dozen public teams that you can join if you’d like to participate in the Games. Remember, a team must have at least 2 players in order to participate.
I’m loving some of the team names, like Excessive Use of -Force and Troll Bait. I know several local user groups are forming teams as well, and encouraging their members to join. You’re welcome to use email, Twitter, Facebook, LinkedIn, or even standing outside and screaming as ways of recruiting members to your team.
The practice event starts Jan 6. Please pay attention to PowerShell.org’s home page for late-breaking announcements - if we have a problem, we’ll post there to let you know.
Good luck!

Don Jones
PowerShell for Admins

Using Install-WindowsFeature with Offline Source

As you probably know, the Install-WindowsFeature (used to be Add-WindowsFeature; that’s now an alias to Install-) can add Windows roles and features from PowerShell. If your server doesn’t have the installer source on the local disk, then the cmdlet will default to grabbing it from Windows Update - a pain for disconnected servers. Install-WindowsFeature does offer a means of using an alternate local source (like a DVD or file server location), but using it can be a bit hinky.
The cmdlet help indicates that you should point to a Windows image (WIM) file. That’ll work, but you can’t just provide the path of the WIM. You also need to put a wim:/ prefix on the front of the path, and a suffix that tells the thing which edition of Windows you’re working with, so that it grabs the right bits. For example, wim:/d:/sources/install.wim:4. That “4” is the suffix for Datacenter Edition, telling the installer to look at index 4 within the WIM for the necessary feature.

Don Jones
Announcements

State of the Org, ending 2013

I wanted to take a moment and wish everyone a very happy new year, and to do a sort of wrap-up of 2013 from PowerShell.org’s perspective.
We started 2013 with a bang, including our first-ever PowerShell Summit North America, held on-campus at Microsoft in Redmond. We’ll be returning to the Seattle area in April 2014 for PowerShell Summit North America 2014, and are planning the first PowerShell Summit Europe 2014 in Amsterdam in September. For the N.A. show, we need about 50 more Summit attendees to break even, and can accommodate about 100 more than we’ve currently got registered.
We ran a very successful Scripting Games that kicked off just as the Summit was ending. Thousands participated, tens of thousands of dollars in prizes were handed out, and most importantly the Games made the transition from being a much-loved child of the Microsoft Scripting Guys to being a community-owned event that can hopefully continue forever. We’ve got the first Winter Scripting Games in a loooong time starting in just a few days, in fact.
In the wake of The Scripting Games, we ran a summer-long series of Great Debates, and your comments on those informed the first-ever Community Book of PowerShell Practices, now offered as a free ebook.
PowerShell.org, Inc. closed its first fiscal year at the end of June 2013, and financially we lost just a bit of money. Don’t worry - that was always more or less the intent; we’re not running the corporation to make a buck, but rather to more-or-less break even. At the moment, we have $29,988.25 in our checking account, most of which is earmarked for Summit 2014 expenses.
We’re now providing hosting services for about 17 local and regional user groups, giving them a spot to post upcoming meeting dates, post-meeting file attachments, and other details. We’re hoping this helps raise awareness of the efforts they’re all making to have a strong local PowerShell support system in place.
2013 also saw the PowerScripting Podcast become a welcome part of PowerShell.org. Host Jon Walz also got his first MVP Award, a long-awaited and well-deserved honor that he now shares with co-host Hal Rottenberg. Everyone appreciates the hard work they do, and we at PowerShell.org wanted to make sure they had the resources to keep doing it (equipment ain’t free), so we offered to help out when they needed, and they graciously accepted. We’re delighted to be working with them.
PowerShell.org played an important role in developing Microsoft’s official entry-level PowerShell training, course 10961, by giving the authors (e.g., me) a place to survey folks about topic, level of coverage, and more, and to solicit feedback on the “A” and “B” revs while updating the course for PowerShell v4. This site (and all of you) also played an important role in selecting topics for the advanced-level training, course 10962, which will be developed in 2014. Finally, you all helped provide feedback for Microsoft Courseware Marketplace course 55039, which covers PowerShell scripting and toolmaking. When you see a survey posted here, jump in - it makes a very real difference in some very important projects!
2013 was also the year we Moved to Azure, spinning up an Azure-hosted CentOS VM that’s now running the site. It’s gotten faster, is a bit easier to maintain, and is a heck of a lot more highly available thanks to Microsoft’s cloud hosting.
I’m extremely proud to have had so many folks jump in and help out this year. Dave Wyatt, Matt Penny, Matt Johnson, Mike Shepard, and Nicholas Getchell have all taken on curator roles for the free ebooks we offer on PowerShell.org. They’re doing a wonderful job in making sure those titles stay updated - so much so, that we’re now just linking to the books’ GitHub repository, where you can download the DOC files directly. Dave Wyatt has also been posting some incredibly detailed and informative blog posts that I hope you’re reading - I really appreciate his contributions here. I also want to thank Matt Tilford, Chris Hunt, and Mark Keisling, who have taken on editorial duties for the TechLetter newsletter. Our aim is to put out a solid, informative, technically deep monthly offering and these guys are absolutely on the job. I hope you’re subscribed, because if you aren’t, you’re missing out. Finally, MVP Steven Murawski has made PowerShell.org his home for Desired State Configuration (DSC) blogs and code, and he’s been prolific. His employer, StackExchange, has been an early adopter of the DSC technology, and Steven’s been sharing pretty much everything he’s learned.
We’ve had some transitions in 2013. Board member and co-founder Kirk Munro has had to step away from day-to-day duties with PowerShell.org, although he remains a member of the board. Board member Jason Helmick has stepped into a second-in-command position, and is more or less running the North America Summit from an operational perspective. Jason earned his first MVP Award this year, giving us an all-MVP Board that also includes myself, Jeffery Hicks, and Richard Siddaway.
I’m extremely proud of everything we’ve accomplished. I’m delighted that so many folks are jumping into the forums and offering answers to questions - it’s a massive relief on my own workload, and there are some damn smart folks offering their help to the community for free. In fact, we plan to recognize some of them in our first-ever PowerShell Heroes award, scheduled for January 2014. We’re also going to make good on a promise I made when we started this site: our above-and-beyond contributors are going to become part-owners of this community with an award of stock in PowerShell.org, Inc. That’ll give them some concrete control over the community they’re helping to build. Look for that mid-2014, when we near the end of our fiscal year.
For 2014, I’d like to thank our returning sponsors, SAPIEN Technologies and Interface Technical Training. These folks give a lot, financially, to help make this site work. Please show them your appreciation in every way you can. In 2014, my company, Concentrated Tech, is also coming aboard as a sponsor, and I’ll be offering my first-ever public PowerShell training.
I think 2014 should be a great year, both for PowerShell.org and for the broader PowerShell community that we’re trying to serve. If you’re new here, or you’ve just been lurking, please jump in and help. Write an article about something you learned, answer a question in the forums, or volunteer to help out. We’re all in this together, and the stronger a community we all make _together, _the more we’ll be able to support each other when needs arise.
I look forward to serving you in 2014!
Don Jones
President and CEO

Richard Siddaway
Scripting Games

Introducing the Judges for Winter 2014 Scripting Games

In the last few years there has been a long list of people judging the Scripting Games. Those people were expected to view as many entries as possible, preferably all, and score the entries as well as providing feedback on the individual entries. That is a ton of work especially when you consider that the judges were all volunteers.
This time round we’re attempting to spread the load somewhat. Mike Robbins has done a superb job recruiting coaches for the Its their job to look at the entries and make suggestions and hints to the teams - if the teams wish to take advantage of this option. Looking at the list of coaches - I know I would take advantage of their assistance if I was competing.
That leaves judging. This time we’re using a small group of judges. We have prepared scoring criteria for the events with some additional style points available to the judges. This will make MOST of the scoring objective but we’ve a bit of subjectivity available for individual judges to pick out, and hopefully comment on, things they like or don’t like.
The judges are all very experienced PowerShell practitioners with more books written, talks given, blog posts created and classes taught between them than anyone would want to count. In alphabetical order your judges for the Winter 2014 Scripting Games are:
Don Jones - founder and CEO of powershell.org. Author of several PowerShell books including the highly recommended Learn PowerShell v3 in a Month of Lunches and co-author of PowerShell in Depth. Don is a PowerShell MVP, PowerShell educator, columnist and course creator.
Jason Helmick - Board member of powershell.org. A PowerShell MVP and author of Learn IIS in a Month of Lunches which includes lots of PowerShell. Jason also delivered the recent two-part Introducing PowerShell MVA sessions with Jeffrey Snover. PowerShell educator, columnist and speaker.
Jeffery Hicks - Board member of powershell.org. PowerShell MVP. Co-author of PowerShell in Depth, lead editor of PowerShell Deep Dives and author of other PowerShell books. Jeffrey is also a PowerShell columnist and educator
Ed Wilson - The Scripting Guy. Ed runs the Hey! Scripting Guy Author of several PowerShell books including Windows PowerShell Best Practices and Windows PowerShell Scripting Guide. Ed also delivers PowerShell classes and is a much in demand speaker.
The list of judges is completed by
Richard Siddaway - Board member of powershell.org. PowerShell MVP. Co-author of PowerShell in Depth and author of PowerShell in Practice and PowerShell and WMI. Frequent blogger on PowerShell related topics.
Between them the judges have accumulated over 30 years of PowerShell experience that is focussed on judging the Games. They are all looking forward to the Games and hope to see your entries.

Terri Donahue

January Charlotte PowerShell User Group Meeting

Our monthly meeting will be held on January 2nd, 2014. This years Scripting Games is a team based event. What better place to find/join a team than a User Group meeting? We look forward to seeing you there.

Here is some additional information about the Winter Scripting Games:

Teams can consist of between 2 to 6 Scripters and official registration opens on Jan 2nd.

There will be a total of 4 official events for the Winter Scripting Games:

Mike F Robbins
Scripting Games

Introducing the Coaches of the 2014 Winter Scripting Games

A few weeks ago, just before the announcement to start recruiting your team for the 2014 Winter Scripting Games, I was contacted by Don Jones and Richard Siddaway about an opportunity to become the Head Coach for the Winter Scripting Games. I was honored to have been contacted and I’m a firm believer of taking advantage of opportunities when they emerge, especially when they’re PowerShell related, so I graciously accepted.
One of my first responsibilities was to recruit a small team of coaches. I immediately went to work before potential coaches committed themselves to participating on teams. We had a huge number of people in the PowerShell community who had volunteered to be a coach and while we would have liked to have selected everyone who volunteered, we only had a specific number of positions to fill. Without further ado, here is the list of the coaches for the 2014 Winter Scripting Games:

Don Jones
Training

My outline for accelerated PowerShell training

When I teach PowerShell, either at a private client or in a public class, I tend to use my own outlines. I’m comfortable with them, and they work really well. They formed the basis for the Microsoft 10961 and 55039 courses, although I had to make some changes to accommodate Microsoft standards and varying MCT delivery styles. But I’m often asked if there’s a “MOC-equivalent” outline that combines the entry-level 10961 with the scripting-focused 55039.
Yup.
First, do understand that I naturally teach at a very concise and accelerated pace. I don’t spend much time on slides; I tend to skip right to demos, and use those to explain what I’m explaining. If you follow a more common delivery style of around 5min per slide, plus taking your time on demos, my approach might not work well for you. I also tend to not tell a lot of ancillary stories, I tend to make students take break during lab time (rather than individually scheduling breaks), and I tend to be as concise as possible in my lectures.
Also, when accelerating these courses together, you don’t do all of the labs. For labs with multiple components (find these 20 command), I’ll do about 1/3 of them. For the 55039 main-sequence labs, I’ll tell students to pick the “A,” “B,” or “C” version rather than doing all three; sometimes I’ll just have them do the “D” version (which gives them a pre-done starting point for each module, rather than making them build on their own work from a previous module).
For Day 1, I’ll cover modules 1-5, and maybe module 6, from 10961. Day 2 will be modules 7, 9, 11, and 12 (covering 6 first, if I didn’t get it done on Day 1). That’s the “core” PowerShell stuff. It’s a fast delivery; it’s possible to spread those out over three days if you prefer, but I explicitly skip modules 6, 8, and 10 at this stage.
When my students all have strong shell or scripting skills, 2 days often gets me through that. If they’re newer, I’ll go slower on modules 1-5, do more of the labs, and take 3 days to cover that 10961 material.
The remainder of the course comes from 55039. That’ll be 2 or 3 days, depending on how long it took you to do the 10961 material. Regardless, I’ll cover modules 2-5. I’ll usually skip module 6, and try to end the day with module 7 on debugging. I’ll cover module 8, 9, and 10. That’s usually 2 days, so it’s the last thing I do if I took 3 days to cover the 10961 stuff.
If I got through 10961 in 2 days, I’ll finish the 55039 material, covering modules 11, 13, and 16. If students insist on workflows, I’ll throw that module in there - I have mixed feelings and results when it comes to workflow, so it’s not part of my standard accelerated delivery. If you have extra time, my priority then goes to modules 15, 13, and 14, in that order. 14 gets you some GUI-building experience, so if the class is pushing for that I’ll include that module instead of workflow.
If all that seems a little informal - well, it is. I’m very good at reading my students, and making sure folks are actually keeping up, so I don’t press too hard. This is a lot of conceptual and practical material to cover in a week.
Price-wise, in the US, I see this kind of accelerated class going for around $3500, although a lot of training centers offer significant discounts. This accelerated outline is absolutely worth it: you’re literally taking someone from zero and teaching them how to build their own script modules and tools in PowerShell. It’s a lot to cover; not every class will be up to it.
The labs in both courses are solid, and I’m especially happy with the ones in 55039 in terms of what they cover, and in how challenging they are. I’ll warn you that the 55039 labs don’t do a lot of hand-holding. Students are expected to learn the material and then execute the labs; the “answer keys” are outright sample solutions, not hints. But if you teach the material as provided, everything students need is in there - if they’re willing to work hard and retain what you’ve shared.