Skip to main content


Showing posts from November, 2018

Classy Powershell

Using classes in PowerShell So I've recently come to fall in love with PowerShell, despite all its strange quirks and odd behaviors. For those not in the know, some time ago, Microsoft decided that they needed a more fully functional scripting language then the command line syntax that existed. So they spent a bit, and before you know it they had spun up PowerShell. So, being one of those programmers who aren't just satisfied with if/then loops in my languages, I wondered if given its object-oriented nature, PowerShell supported classes. It turns out, that with the introduction of PowerShell 5.0, they had actually introduced the concept of classes; however, as I was searching around for how to use them, the documentation was a bit more... sparse.
More than one file?  If you're like me, your programming is usually organized with handy dandy folders, I usually have something like this
main.ps1 - The actual "Executable" code that the user runs
- \lib\ - A series of…