A PowerShell Parameter Puzzler

I ran across an interesting PowerShell behavior today thanks to a coworker (hi Matt!). It involved a function with just a few arguments. When I looked at the syntax something looked off. I am not going to recreate the exact scenario I found (because it involved a cmdlet written in C#), but I was able …

Continue reading ‘A PowerShell Parameter Puzzler’ »

The PowerShell Conference Book

Back in May, Mike Robbins (@mikefrobbins) asked if I wanted to contribute a chapter to a book he was putting together. The book would include chapters from different scripters in the PowerShell community and each would provide material that would be similar to a session at a conference.In addition, the proceeds from the sale of …

Continue reading ‘The PowerShell Conference Book’ »

PowerShell DSL Module Considerations

Just a quick note to mention a couple of things I’ve come across with PowerShell modules that encapsulate DSLs (Domain Specific Languages, specifically WPFBot3000). PowerShell Command Name Warnings PowerShell modules have always issued warnings if they contain commands that don’t use approved verbs.  What’s fun with modules for DSLs is that the commands in general …

Continue reading ‘PowerShell DSL Module Considerations’ »

A PowerShell WPF DSL (Part 2) – Getting Control Values

Some Background Before I start, I should probably take a minute to explain what a DSL is and why you would want to use one. A DSL (domain-specific language) is a (usually small) language where the vocabulary comes from a specific problem domain (or subject).  Note that this has nothing to do with Active Directory …

Continue reading ‘A PowerShell WPF DSL (Part 2) – Getting Control Values’ »

Starting a PowerShell DSL for WPF Apps

The problems There is always a problem. In my case, I had two problems. First, when I teach PowerShell, I mention that it’s a nice language for writing DSLs (domain-specific languages). If you want an in-depth look, Kevin Marquette has a great series on writing DSLs. I highly recommend reading it (and everything else he’s …

Continue reading ‘Starting a PowerShell DSL for WPF Apps’ »

Getting Data From the Middle of a PowerShell Pipeline

Pipeline Output   If you’ve used PowerShell for very long, you know how to get values of of a pipeline. Nothing too difficult there. Where things get interesting is if you want to get data from the middle of the pipeline. In this post I’ll give you some options (some better than others) and we’ll …

Continue reading ‘Getting Data From the Middle of a PowerShell Pipeline’ »