Articles

PowerShell articles, tutorials, and guides from community experts.

Steve Parankewich
Announcements

Boston PSUG Kick Off Meeting Tomorrow

Hello fellow PowerShell enthusiasts. I have been missing for a few months with a new child that has occupied most of my extra time! I look forward to get back in the blogging gear soon. I just wanted to send out a note that we are hosting our first kick off meeting for the Boston PowerShell User Group at the Microsoft MTC in Kendall Square Cambridge, MA. Here are the two topics that will be delivered via Matt Nelson and Will Schroeder.

Matthew Hodgkins
DevOps

Making Awesome Dashboards from Windows Performance Counters

Having an understanding of your systems performance is a crucial part of running IT infrastructure. If a user comes to us and says “why is my application running slowly?”, where do we start? Is it their machine? Is it the database server? Is it the file server? The first thing we usually do is open up perfmon.exe and take a look at some performance counters. You then see the CPU on the database server is 100% and think _ “was the CPU always at 100% or did this issue just start today?

Jaap Brasser

Dutch PowerShell User Group opens its doors on Slack

In the past few weeks there has been a flurry of activity in the DuPSUG organization. We have been working on organizing the first PowerShell Saturday in the Netherlands and we recently also opened our doors on Slack, with our DuPSUG slack initiative. On Slack we will provide a platform on which we will share our content and provide another platform for our members and PowerShell enthusiasts worldwide to interact with the Dutch scripting community.

Don Jones
Books

Your feedback wanted! New eBook Hosting for PowerShell.org

After dealing with numerous problems from PenFlip (where our free ebooks are currently located), we’ve decided to try two new hosting providers: GitBook and LeanPub. Both of these are, or can be, based on Git/GitHub, which means the Markdown text of the book will always be open-sourced and available. Both offer conversion into PDF, MOBI, and EPUB formats, so you can download whichever you want. Both enable us to update the books at any time.

Mike F Robbins

MSPSUG May 10th Virtual Meeting: Acceptance Testing PowerShell DSC with Test-Kitchen

Join the Mississippi PowerShell User Group virtually on Tuesday, May 10th 2016 at 8:30pm Central Time when Microsoft MVP Steven Murawski will be presenting “Acceptance Testing Desired State Configuration with Test-Kitchen”. DSC is awesome, but only if the resources and configurations do what you want them to do. How do you know? If you are relying on DSC to tell you when it didn’t do the right thing, you are in for a world of hurt.

Don Jones
Announcements

GET YOUR STICKERS!!! (AND WALLPAPERS!!!) (AND INTERNATIONAL STICKERS!!!)

OK, we finally have a huge batch of PowerShell.org and DevOpsCollective.org laptop stickers! These are great, heavy-duty, removable stickers for laptop and every day use. Here’s how you can get yours - follow these instructions carefully! United States First, this offer is only valid until July 1st, 2016. After that, you’ll have to attend PowerShell + DevOps Global Summit, our Ignite “PowerShell Community Happy Hour” event, or someplace else where we’re in-person to get a sticker.

msorens
PowerShell for Admins

Documenting your PowerShell API–solved!

Long has it been known how to easily document your PowerShell source code simply by embedding properly formatted documentation comments right along side your code, making maintenance relatively painless… But if you advanced to writing your PowerShell cmdlets in C#, you have largely been on your own, either hand-crafting MAML files or using targeted MAML editors far removed from your source code. But not anymore. With the advent of Chris Lambrou’s open-source XmlDoc2CmdletDoc, the world has been righted upon its axis once more: it allows instrumenting your C# source with doc-comments just like any other C# source:

i255d
Scripting Games

Scripting Games May 2016 AD Puzzle

I love working in AD (Active Directory) with PowerShell. I find that I have had to really dig in to learn some of the syntax nuances that you need to understand to really mine data and change configurations within Active Directory. This puzzle reflects the kind of situation that people have to deal with in PowerShell everyday. I am interested to see what kinds of approaches each of you will take, this is a real chance to learn more of the diversity of methods that can be used in Active Directory with PowerShell.

Don Jones
PowerShell Summit

Verified Effective Exam Results

We’ve uploaded the results of the Verified Effective: PowerShell Toolmaker exam, which was administered at the recent PowerShell + DevOps Global Summit 2016. Note that this exam has, for a couple of years now, been available only as an on-site, in-person, proctored experience - we do not offer online delivery.
We had our best pass rate ever - about 20%. That said, nobody hit 100%. I had actually done a pre-con, full-day session on the very topic being tested - writing advanced functions - and had more than a few folks tell me that the session wasn’t as “advanced” as they wanted. Notwithstanding, 80% of the people who took the test didn’t pass (and I wasn’t the one grading the tests, either, so it’s not just spite!). Unfortunately, a lot of us think we’re “advanced,” but in fact are missing a lot of details. In some cases, having reviewed the graded tests, folks are missing some of the basics.
If you took the test, head over to VerifiedEffective.org and enter your candidate ID to see if you passed. I want to stress that I personally don’t have access to the graded tests with names attached - I only have anonymized copies.
We’re not going to offer the exam again at Summit 2017. We’re considering making some schedule changes that won’t accommodate the time and space and personnel needed to administer the exam and - to be frank - I think education would benefit a lot of people more than a test. Whether we offer the test again in future years hasn’t yet been decided, although I’ll share our general feelings at the end of this article.
In fact, with that “education” in mind, I’m going to break a rule. I’m going to post the entire exam packet, exactly as it was given to the attendees who took the exam. I did something similar after PowerShell Summit Europe 2015, but this is the exact exam packet. Go ahead - give yourself an hour to finish the test, and then check back here. I’ll wait.
Exam

Jacob Moran
PowerShell for Admins

Keeping it simple – Line breaks in PowerShell

Trying to get your code to look good when reading it later can be tricky For line breaks in function scripts, there are two out-of-the-box options: First, you can break a line after the pipe key, which is an elegant and easy-to-read approach. Second, you can arbitrarily break a line with a back tick mark, which you will find left of the number 1 on a standard US keyboard. **It looks like this: ** But did you know that the back tick is a hack?