All .Net Exceptions List

When I am creating error messages in PowerShell scripts, I like to use common .Net exceptions. Most of the time when I am searching for a list of exceptions to use, I end up using the All .Net Exceptions list generated by Mike Vallotton. I thought it was a clever idea so I went ahead and generated an updated list of my own.

I did this by parsing all the .Net 4.6.1 Namespace xml files on my system. All of the content below is auto generated and comes from Microsoft’s files that are used for IntelliSense. I hope you find this list of .Net Exceptions as useful as I do.

[Read More]

Powershell: What have you done this month? March 2017

I did a lot more this month than I expected. Here is a breakdown of all the posts and other Powershell projects that I worked on.

Personal/Community efforts

These are the projects and idea that I do on my own time for the community. Most of my personal projects are published on this blog or as a contribution on GitHub.

[Read More]
Tags: Review

Mnemonic wordlist

We were having a conversation recently at work about server naming conventions and it reminded of an article where the author was using a mnemonic word list to name servers. After a little digging, I was able to track it down.

[Read More]
Tags: Other

Powershell: Gherkin specification validation introduction

Pester has a interesting secret feature that we need to talk about. It supports Gherkin-style feature specifications. I had no idea this was even a thing until I was looking at one of Joel Bennett’s modules and saw something I had not seen before.

This feature allows you to define your features and specifications in a simple business readable syntax. Then you crate a validation script that gets executed with that specification. It will give you pass/fail results on each item like Pester. I think this is awesome and more people need to know about it. I am not exactly sure when this feature was introduced, so you may need to update Pester to get it.

[Read More]

Powershell: DSL design patterns, DSLs part 3

When I was working on my DSL, I found that I had to be more creative with my advanced function implementations than I do with normal advanced functions. When it comes to writing a script CmdLet, there are lots of community standards and expected behaviors already defined.

When creating a DSL, you may be bending a lot of those best practices to create the best user experience. When optimizing for the user, you may find yourself collecting and processing data using different technique.

[Read More]

Powershell: Writing a DSL for RDC Manager, DSLs part 2

I am not sure how many times I have written a script to generate server lists for Microsoft’s Remote Desktop Connection Manager (RDCMan). I find that it is a very easy script to write many different ways. Writing a Domain-Specific Language (DSL) to generate RDCMan files may not be the best solution for this problem, but generating RDCMan files is a good project for a first DSL.

[Read More]

Powershell: Creating and using custom attributes

Every once and a while I stumble onto something in Powershell that I find interesting and I can’t help but dive deep into it. I saw a tweet by Brandon Olin recently that showed that you can create your own custom attributes in Powershell.

We can have a lot of fun with that.

[Read More]

Powershell: Let's build the CI/CD pipeline for a new module

A fresh start to building a module.

I have not built a module from scratch in a long time. My process has evolved and I have incorporated a lot of ideas into my process. Most of the time, I copy an existing module and just got out all the functions. This has worked because each module grows a little more from the last time I built one.

I also realize that I may have some older ideas baked into my process. I have seen a lot of good work in the community that I have not formally adopted because what I had just worked. It was quick and easy to run with.

I am working on a new module and I want to rethink a lot of the things I have done when setting up a new module. I especially want to incorporate CI/CD (Continious Integration and Continious Delivery) ideas into my pipeline. To help get a fresh perspective on this, I am going to build it based on the work done by Warren Frame (RamblingCookieMonster) and I am going to use his PSDepend project as my reference. He has built quite a few modules for the community. It also helps that he has written many of the modules that I am planning on using and has several great blog posts covering those modules.

[Read More]