This blog post is part of a web series of 5 posts that covers everything that needs to be known about powershell classes. The series covers the creation of a “computer” class that is ‘enhanced’ throughout the series. In the end, we will have a class system that will be able to provision servers / clients (computer objects) in our active directory dynamically respecting specific constraints. In this specefic post, we will see everything you need to know about powershell static methods.

Quick reference:

part 1, covers all the basic concepts of classes in general are covered. We explain the vocabulary, and why we even would like to work with Classes. We learn how to create our first class, and what properties, methods, and constructors are, and how to create them.

In part 2, we tackle powershell Enums. We will expand our base class “Computer” and integrate the use of Enums. Simple, but powerfull.

In part 3 (This post) we discuss powershell static Methods, make our original class more and more autonomous.

In part 4 we tackle a fundamental part of powershell classes (if not the most important one): Powershell class inheritance.