I find it’s a bit weird to check the type of .NET Class in PowerShell.
For example, if you issue the command:
[system.math] | gm
You’ll get a long list of generic members with the type name on the first line:
TypeName: System.RuntimeType
But if you run:
[system.math] | gm -static
It gives you the real static members of this class with the type:
TypeName: System.Math
It looks confusing to me. From my understanding, the -static parameter only tells the command to retrieve static members but should not affect the type if returns.
You are getting System.RuntimeType in the output because system.math is a class type not an object. You will get the same results when piping System.Int32 to gm:
[System.Int32] | gm
TypeName: System.RuntimeType
However, when you create integer object “73” using system.int32 and pass it to gm, you will get a System.Int32 object, along with its static methods.