Cannot list methods of SMS_BaseClass with gwmi

Welcome Forums General PowerShell Q&A Cannot list methods of SMS_BaseClass with gwmi

This topic contains 2 replies, has 2 voices, and was last updated by

 
Participant
5 years, 1 month ago.

  • Author
    Posts
  • #11377

    Participant
    Points: 1
    Rank: Member

    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.

  • #11378

    Member
    Points: 0
    Rank: Member

    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
    
  • #11379

    Participant
    Points: 1
    Rank: Member

    Yes they are.Thanks 🙂

The topic ‘Cannot list methods of SMS_BaseClass with gwmi’ is closed to new replies.