Get-Command, Aliases, and a Bug

I stumbled across some interesting behavior the other day as I was demonstrating something that I understand pretty well. [Side note…this is a great way to find out things that you don’t know…confidently explain how something works, and demo it.] I was asked to give an overview of how modules work in PowerShell. I’ve been …

Continue reading ‘Get-Command, Aliases, and a Bug’ »

Some small PowerShell bugs I’ve found lately

I love PowerShell. Everyone who knows me knows that. Recently, though, I seem to be running into more bugs. I’m not complaining, because PowerShell does tons of amazing things and the problems I’m encountering don’t have a huge impact. With that said, here they are. Pathological properties in Out-GridView PowerShell has always allowed us to …

Continue reading ‘Some small PowerShell bugs I’ve found lately’ »

Debugging VisioBot3000

The Setup Sometime around late August of 2016, VisioBot3000 stopped working.  It was sometime after the Windows 10 anniversary update, and I noticed that when I ran any of the examples in the repo, PowerShell hung whenever it tried to place a container on the page. I had not made any recent changes to the code. …

Continue reading ‘Debugging VisioBot3000’ »

Module Structure Preferences (and my module history)

Modules in the Olden Days Back in PowerShell 1.0 days, there were no modules.  Uphill both ways.  In 1.0, we only had script files.  That means you had a couple of choices when it came to deploying functions.  Either you put a bunch of functions in a .ps1 file and dot-sourced it, or you used …

Continue reading ‘Module Structure Preferences (and my module history)’ »

VisioBot3000 Settings Import

It’s been a while since I last spoke about VisioBot3000.  I’ve got the project to a reasonably stable point…not quite feature complete but I don’t see a lot of big changes. One of the things I found even as I wrote sample diagram scripts was that quite a bit of the script was taken up …

Continue reading ‘VisioBot3000 Settings Import’ »

Re-Thinking Positional Parameters

I mentioned in a previous post that I’ve recently changed my mind a bit about the Position parameter attribute. I guess technically it is the position parameter of the Parameter parameter attribute (i.e. there’s a parameter attribute called “Parameter” and it has a parameter called position). I don’t think you could come up with something …

Continue reading ‘Re-Thinking Positional Parameters’ »

You don’t need semicolons in multi-line hashtable literals.

This is not a world-changing topic, but I thought it was worth sharing. If you have written hashtable literals on a single line, you’ve seen this before: Sometimes, it makes more sense to write the hashtable over several lines, especially if it has several items. I’ve always written them like this: I was watching Don …

Continue reading ‘You don’t need semicolons in multi-line hashtable literals.’ »