Every day some one tends to ask me if there is a simpler way to do task A or B, and the minute I mention PowerShell the response is almost always the same, “yea i have been meaning to learn that but. This really saddens me for 2 reasons,
- Because PowerShell can and does make your life simpler
- i am already seeing peoples jobs get replaced when they fall behind in the skill and as more and more companies move closer to automation it will only get worse.
It saddens me even more so when I see co-workers who i have taken the time to write the scripts to improve the speed of resolution not use them either. then wounder why i am able to fix the same issue in a fraction of the time they have.
Part of building a functional test lab is being able to deal with cattle and not pets. With that in mode I’m writing a series about the script necessary to build a production like lab for testing DSC, and be able to to tear it down and rebuild it with little effort.
Part 1 is about bootstrapping DSC for the Root CA. and doing so without using plaintext passwords.
I would welcome some feedback on both my methods and writing style.
Have you ever needed to communicate between scripts, perhaps running on different servers and in different languages? Did you use a non-standard “messaging” solution like the file system or a SQL database? Did you try to avoid this and squeeze everything into a monolithic, delicate script?
RabbitMQ is a solid messaging solution that happens to have a handy REST API and .NET client, which means we can use PowerShell!
Wrote a quick hit on setting up a simple RabbitMQ deployment and using PowerShell to manage the solution and send and receive messages. Thanks go to Mariusz Wojcik and Chris Duck for writing and sharing the PowerShell modules that were tweaked for this article.
Ever wonder how PowerShell seems to know how to format objects? When you run
Get-ChildItem or
Get-WmiObject , you only see a few key properties, but a wealth of other information is available through commands like
Select-Object and
Get-Member .
Have you ever written a PowerShell function that you nearly always pipe to
Format-Table ? Wouldn’t it be nice to specify some default properties and force them into a table?
Stop by for a quick hit on how to decorate your PowerShell objects with type names and formatting, including a re-usable tool to abstract out some of the details.
As you’ve probably read, Microsoft recently announced that they’re getting on board with SSH, and that they’ve plans to, in some future-and-unspecified version of Windows, include a default SSH server and client. Some folks have taken to the Twittersphere rejoicing this decision, even though I suspect they’ve no idea why Microsoft is doing it. Others have suggested that this is the downfall of Remoting (management via WS-MAN), because who would want that when you’ve got SSH?
The PowerShell code you write can turn up in interesting places. Production services might rely on it. Your co-workers might take a peak and borrow ideas from it. You might decide to share it online. Someone might see your code online and use it in their own solutions.
Hit the link for a quick bit on how we can help create more reliable, consistent, and secure solutions. Simplified to one line: always ask yourself “what could go wrong?”
Jason Helmick and I were recently up in Redmond recording a Microsoft Virtual Academy series entitled, “Building Your Datacenter One DSC Resource at a Time.” While we were there, we decided to film a tongue-in-cheek promo for the series that started with the premise that, “if you haven’t already learned PowerShell, you missed the bus.” Obviously, there’s a bit more to the story.
Configuration IDs - Globally Unique Identifiers, or GUIDs, that DSC nodes use to identify themselves to a pull server - have always been a limiting factor in DSC design and architecture. In the April 2015 preview of WMF5, however, Microsoft has completely overhauled Configuration IDs. If you’re working with DSC, this is must-have information.