What have you done with PowerShell this year?

Over on /r/PowerShell, we share with each other things that we have done with PowerShell every month and reflect on that at the end of the year. As I look back on my year in PowerShell, I see that I have accomplished quite a bit. Not only have I done great work in a professional setting but I have also done a lot for the PowerShell community this year.

[Read More]
Tags: PowerShell

Powershell: Introducing PSGraphPlus with Show-GitGraph

I have been presenting my PSGraph module to a few Powershell user groups. One thing I do in my demos is use local system information to generate graphs. Things like network connections and process relationships. Some of them have turned out to be quite useful. So I have started compiling them into a new module called PSGraphPlus.

One of the commands that I find myself running all the time from this module is Show-GitGraph. I spent today working on it and I would like to share my progress.

[Read More]
Tags: PowerShell

Powershell: Tracking changes

Every once in a while, I see someone ask for a way to track changes to something. It reminds me of a script I wrote once to track changes made in Active Directory. Twice a day, my team was emailed with a report showing all the user account, group membership, and group policies that were changed. It turned out to be a valuable tool in giving everyone visibility to the changes that were recently made.

I’m reminded of that script because I handled that scenario in a very generic way that could be applied to many other things that you would want to monitor.

[Read More]
Tags: PowerShell

Powershell: PSGraph 1.2, The SubGraph Release

When I set out to write PSGraph, it started as a way to just write GraphViz instructions in PowerShell. The structure and syntax of GraphViz heavily influenced how I build the commands in PSGraph. This release polishes some of those commands and starts to work on doing more than just translating command. My focus of 1.2 was to make subgraphs easier to work with.

[Read More]
Tags: PSGraph

PowerShell: Automatic Module Semantic Versioning

I am just getting started on a new module PSGraphPlus and if you know me, this is when I take a look at how I build modules. I fleshed out a lot of little bugs with my Full Module Plaster Template and I spent a little time working on my module build script. I may talk about that build process in another post but for the sake of this conversation, it is just a script that I run that performs several actions on my module. It runs tests, bumps the version and publishes to the PSGallery.

Today, I am going to walk you through how I bump that version based on changes in my module.

[Read More]

Powershell: The many ways to use regex

Regular expressions (regex) match and parse text. The regex language is a powerful shorthand for describing patterns. Powershell makes use of regular expressions in several ways. Sometimes it is easy to forget that these commands are using regex becuase it is so tightly integrated. You may already be using some of these commands and not even realize it.


Image from xkcd.com, slightly altered

[Read More]

Powershell: Building a Module, one microstep at a time

I am really quick to build a module out of my scripts and functions. I like how it allows me to organize my functions and use them in other scripts. I also see that many PowerShell scripters are slow to take that step of building a module. We often learn how to build a module without really understanding why they are built that way.

In this post, we will turn a common script scenario into a full module one step at a time. We will take several microsteps to show all the subtle details of why common modules are built the way they are. Lets take the mystery out of building a module to see how simple they can be.

[Read More]

Powershell: Writing an alternate TypeExtension DSL, DSLs part 5

In my last post on DSLs, I broke down a proposed DSL that someone else had described. It was drafted specifically as an example DSL for a RFC. Today, I am going to propose an alternate DSL syntax and I am going to break down the implementation just like I did last time.

My real motivation for this is to break away from the way most DSLs are implemented. There is a strong tenancy to see every keyword as an advanced function that takes a string and a script block. I want to show that we have other options.

[Read More]

Powershell: GetPlastered, a Plaster template to create a Plaster template

I recently started working with Plaster and I really like this module. I covered my first template in my Adventures in Plaster blog post last week. I have been pulling together ideas for more Plaster templates and I thought up a fun one to work on.

I am going to build a Plaster template that builds a Plaster template. I am calling this new template GetPlastered.

This will be a good example demonstrating the TemplateFile features of Plaster.

[Read More]

Powershell: Adventures in Plaster

David Christian recently wrote an article about how to use Plaster on OverPoweredShell.com. If you are new to Plaster, I pulled this from the Plaster readme.

Plaster is a template-based file and project generator written in PowerShell. Its purpose is to streamline the creation of PowerShell module projects, Pester tests, DSC configurations, and more. File generation is performed using crafted templates which allow the user to fill in details and choose from options to get their desired output.” -The Plaster readme.md

[Read More]