Visio Constants in VisioBot3000

One of the great things about doing Office automation (that is, COM automation of Office apps) is that all of the examples are filled with tons of references to constants. A goal of VisioBot3000 was to make using those constants as easy as possible. I mentioned the issue of having so many constants to deal …

Continue reading ‘Visio Constants in VisioBot3000’ »

Get-Learning – Introducing a new series of PowerShell Posts

I’ve been blogging here since 2009. In that time, I’ve tried to focus on surprising topics, or at least topics that were things I had recently learned or encountered. One big problem with that approach is that it makes it much more difficult to produce content. I really enjoy writing, and I’m teaching PowerShell very …

Continue reading ‘Get-Learning – Introducing a new series of PowerShell Posts’ »

Calling Extension Methods in PowerShell

A quick one because it’s Friday night. I recently found myself translating some C# code into PowerShell.  If you’ve done this, you know that most of it is really routine.  Change the order of some things, change the operators, drop the semicolons. In a few places you have to do some adjusting, like changing using …

Continue reading ‘Calling Extension Methods in PowerShell’ »

Specifying PowerShell Parameter Position

Positional Parameters Whether you know it or not, if you’ve used PowerShell, you’ve used positional parameters. In the following command the argument (c:\temp) is passed to the -Path parameter by position. The other option for passing a parameter would be to pass it by name like this: It makes sense for some commands to allow …

Continue reading ‘Specifying PowerShell Parameter Position’ »

Missing the Point with PowerShell Error Handling

I’ve been using PowerShell for about 10 years now.  Some might think that 10 years makes me an expert.  I know that it really means I have more opportunities to learn.  One thing that has occurred to me in the last 4 or 5 months is that I’ve been missing the point with PowerShell error …

Continue reading ‘Missing the Point with PowerShell Error Handling’ »

Lots of Recent User Group Activity!

There has been a lot of PowerShell activity in Missouri lately. I started the Southwest Missouri PSUG in June and have had 4 successful meetings covering the following topics: June – organizational July – Error Handling August – Pester September – DSC I also spoke at the St. Louis PSUG in August (on Error Handling).  Ken Maglio …

Continue reading ‘Lots of Recent User Group Activity!’ »

Celebrating Fake Internet Points in the PowerShell Community

This week, I (finally) hit 10,000 points on StackOverflow. On some level, I know it’s just fake internet points, but it’s a nice milestone. Like everyone I know in IT, I often find useful answers to questions I have on StackOverflow. Since there are so many answered questions on that site, I generally don’t even …

Continue reading ‘Celebrating Fake Internet Points in the PowerShell Community’ »

Voodoo PowerShell – VisioBot3000 Lives Again!

Back in January I wrote a post about how VisioBot3000 had been broken for a while, and my attempts to debug and/or diagnose the problem. In the process of developing a minimal example that illustrated the “breakage”, I noticed that accessing certain Visio object properties caused the code to work, even if the values of …

Continue reading ‘Voodoo PowerShell – VisioBot3000 Lives Again!’ »

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’ »