Articles

PowerShell articles, tutorials, and guides from community experts.

Missy Januszko
PowerShell for Admins

DevOps: A Career Changer

Once upon a time, there was this woman at a TechMentor conference a few years ago, sitting in the front of the room during the “Don and Jason" show, a not-quite-scripted discussion on various “lightning” topics.

The topic at that moment was DevOps, and this woman was asking for advice on being an advocate for DevOps in her company.

Her company had just been acquired, she explained, which meant that the atmosphere was ripe for change, but the culture of the company they had been acquired from was very change-resistant.

WeiYen Tan
PowerShell for Admins

Pester – Parameters and Hashtable Fun!

I have written a short excerpt on how to pass parameters from an object to a Pester test. I have turned this into a function: Invoke-POVTest.
The function is primarily for operational validation tests, where you might have a single operational test but you need to test multiple cases. (Sorry, I am not quite sure if I described it properly).
I’ll be interested in any feedback.

Link to blog post here.

Don Jones
PowerShell for Admins

UPDATE / Tug: The Open-Source DSC Pull Server

If you haven’t taken a look at Tug, now’s a great time. Eugene Bekker has been doing a ton of heavy lifting, taking my .NET Core proof-of-concept code and turning it into a formal ASP.NET MVC project.

Don Jones
PowerShell for Admins

The Key to Understanding PowerShell – on Windows or Linux

I’ve listened to a few of my Windows-friendly compatriots attempting to explain PowerShell to their Linux colleagues, and it hasn’t always gone well. The problem, I think, is that a lot of Windows folks don’t actually know why PowerShell exists in the first place. Let me explain.

msorens
PowerShell for Admins

PowerShell Gotchas

You can certainly find a number of articles around that present PowerShell pitfalls that can easily trip you up if you are not careful. I took a different approach in my three-part series, A Plethora of PowerShell Pitfalls.
The first two parts are presented in quiz format, together covering the top 10 “gotchas”. They will help you test your awareness to see if you even realized the danger and did not know you’ve been skirting those traps for awhile. After you’ve had an opportunity to consider the conundrums presented, I then go into detailed explanations for why they happen and how to fix them.
The third and final part is a compendium of all the common “gotchas” that I put together after reviewing all the other lists out there. The more than 35 entries in the list cover, I believe, a good 98% of the issues you would likely encounter. Yes, there are more esoteric pitfalls as well, but I ran out of web page… 🙂
Part 1: Pesky Parameter Problems
Part 2: A Portion of Potential Puzzles
Part 3: The Compendium

Don Jones
PowerShell for Admins

The Flavors of Windows Containers

I had a wonderful conversation with some team members around Windows Containers generally, and they had some very cool analogies that I don’t think have been publicized enough. There’s some good technical detail, too, which I think is worth understanding as we move into this brave new world of containerization.

Richard Siddaway
Announcements

Registration is now open

Registration for the 2017 PowerShell and DevOps Global Summit is now open.  Click on Summit and follow the links to register

Richard Siddaway
Announcements

PowerShell & DevOps Global Summit 2017 agenda

The agenda for next year’s Summit is almost complete - we’ve notified all speakers as to whether their sessions have been accepted or not. If you haven’t received your notification please check your spam/junk mail.
We have a small number of sessions yet to publish - mainly around possible focus groups on the Wednesday afternoon.
To view the agenda go to the Summit event site - from https://powershell.org/summit/ click on the Brochure and registration link.
Registration opens 1 November 2016.

Don Jones
Announcements

Re-Subscribe to New Forums Topic Notifications

Hello, PowerShellers!
During our migration and some of the inevitable database resets involved, many of you who were receiving notifications for new forums topics no longer are. You’ll need to re-subscribe.
To do so, simply visit the Forums page, click through to the forum(s) of your choice, and poke the “Subscribe” link that’s towards the upper-left-ish of the page. If all you see is an “Unsubscribe” link, then you’re already good to go.
Thanks again for everyone who routinely jumps in to offer friendly, helpful advice in the forums!!!

msorens
PowerShell for Admins

Pitfalls of the Pipeline

Pipelining is an important concept in PowerShell. Though the idea did not originate with PowerShell (you can find it used decades earlier in Unix, for example), PowerShell does provide the unique advantage of being able to pipeline not just text, but first-class .NET objects.
Pipelining has several advantages:

  • It helps to conserve memory resources. Say you want to modify text in a huge file. Without a pipeline you might read the huge file into memory, modify the appropriate lines, and write the file back out to disk. If it is large enough you might not even have enough memory to read the whole thing.
  • It can substantially improve actual performance. Commands in a pipeline are run concurrently-even if you have only a single processor, because when one process blocks, for example, while reading a large chunk of your file, then another process in the pipeline can do a unit of work in the meantime.
  • It can have a significant effect on your end-user experience, enhancing the perceived performance dramatically. If your end-user executes a sequence of commands that takes 60 seconds, then until 60 seconds has elapsed he/she would see nothing without pipelining, whereas output could start appearing almost immediately with pipelining.

PowerShell provides a variety of techniques for using pipelining but it is all to easy to do it wrong, so you think you are pipelining but in fact you are not. In my article Ins and Outs of the PowerShell Pipeline, I discuss the most common things that can trip you up with implementing pipelining and how to avoid them.