I donβt think so, since you cannot even force PSObject to identify itself as a custom type, for example:
PS> $obj = new-object psobject PS> $obj.psobject.TypeNames.Insert(0,'MyCustomType') PS> $obj.psobject.TypeNames MyCustomType System.Management.Automation.PSCustomObject System.Object PS> $obj -is [MyCustomType] Unable to find type [MyCustomType]: make sure that the assembly containing this type is loaded.
However, you can use Add-Type -TypeDefinition to sprinkle class definitions based on C #, complete with inheritance, in a script. PowerShell still has a command line shell and scripting language. It does not have (and probably shouldn't) all the functions of a general-purpose programming language, such as Python.
source share