Author Posts

November 12, 2013 at 5:50 am

Hi,

Get-CimClass list methods for SMS_BaseClass
PS C:\> get-cimclass -Namespace root/sms/site_ -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_ -Class sms_objectcontaineritem | gm -MemberType Method) – does not list methods as above.

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

November 12, 2013 at 5:55 am

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_ -Class sms_objectcontaineritem -List | gm -MemberType Method

November 12, 2013 at 6:30 am

Yes they are.Thanks 🙂