Cannot list methods of SMS_BaseClass with gwmi


Get-CimClass list methods for SMS_BaseClass
PS C:&gt; get-cimclass -Namespace root/sms/site_<sitecode> -Class sms_objectcontaineritem | select -ExpandProperty cimclassmethods

Name ReturnType Parameters Qualifiers

MoveMembers SInt32 {ContainerNodeID, InstanceKeys, O… {deprecated, Description, impleme…
MoveMembersEx SInt32 {ContainerNodeID, InstanceKeys, O… {Description, implemented, static}

But is there anyway get-wmiobject could do that ?

(gwmi -Namespace root/sms/site_<sitecode> -Class sms_objectcontaineritem | gm -MemberType Method) - does not list methods as above.

I tried -view base,full,adapted extended…with above command no luck.

Are these static methods of the class? If so, you can add the -List switch to your call to Get-WmiObject, which causes it to return a ManagementClass object instead of some number of ManagementObject objects.

gwmi -Namespace root/sms/site_<sitecode> -Class sms_objectcontaineritem -List | gm -MemberType Method

Yes they are.Thanks :slight_smile: