PowerShell PowerTip: What you should know about streams

PowerShell has a concept called Streams, which are the different places data can go (output, error, verbose, etc). You usually don’t have to worry too much about these streams if you’re just writing simple scripts, but it helps a ton to know: All streams are separate even if they all appear to be coming to…


Regular Expressions (REGEX): Introduction

Hi all, this week I’ll be talking about Regular Expressions. I’ve got a few posts planned to get you set up and going with some basic Regex. Regex is used for extracting and validating data. Essentially, you can think of Regex as windows wild cards on steroids. Anytime we need to match data with a little…


PowerShell PowerTip: Checking your PowerShell version

If there is one question I could say I get the most in PowerShell, it is: How do I check my version? Its not a hard thing, but its not an obvious thing. We can actually check our version with a build in variable called PSVersionTable Hope that helps, tune in more often to get…


PowerShell For Programmers: Here Strings, There Strings, Everywhere Some String Strings

There won’t be much code in today’s post, but this can be a useful feature to know about. In addition to the expandable and literal strings we talked about, we can also use something called a Here String. Here strings allow us to have quote characters inside of our string that match the quote characters…


PowerShell PowerTip: Grabbing the location your script lives in

One super common thing in PowerShell is to design a script to consume particular files for data. Often times you are building the script right in the folder for your files. However, it can be annoying to give long, literal file paths to a file. Also, if you give that script to someone else, they…


Working with JSON data in PowerShell

Welcome back everyone! This week we will take another look at some common data types we might encounter in the real world: JSON data. JSON data is used pretty frequently on the web if you’re hitting APIs. This not only includes external data (twitter, weather, marvel database), but often includes internal data to your company….


PowerShell PowerTip: ISE crashing and auto complete not working

Hi all, I’m going to start putting out these short PowerShell PowerTips every so often. They won’t be full blog posts, but they will be short and useful! Have you been having issues with the ISE crashing and not auto completing since windows update 1803? From what I’ve seen there is a fix for this…


Doing more with functions: Verbose logging, Risk mitigation, and Parameter Sets

Welcome back to PowerShell for Programmers, this week I’m trying gitGist again for the code blocks. Let me know what you think about it vs the normal syntax highlighter I use 🙂 As we’ve seen in the other posts about functions, attributes are a really cool thing to extend the features we have available to…


Grabbing Excel (XLSX) values with PowerShell

The Goal: Import data from XLSX files conveniently like import-csv lets you do with simpler data. The preamble: Excel is a mainstay of the business world at this point, which means a lot of the data you might have to work with will come at you as an XLSX file or need to be one….


Doing More With Functions: Comment-Based Help

I just wanted to throw together a post highlighting how cool and easy it is to add help data to your own Functions and scripts. The help data gets added via comments. For functions the help data can go in three places: Before the function keyword (I like it up here) Between the open curly…