A class is used to describe an object. This may be any object, which means that a class in PowerShell might be used for any purpose you could dream up.
Classes in PowerShell are created using the class keyword. The following class contains a single property:
class MyClass {
[String]$Property = 'Value'
}
The class may be created using either new-object or the ::new() method:
PS> [MyClass]::new()
Property
--------
Value
This snippet creates an instance of the class using the default constructor, displaying the property that was defined for the class.