none
WMI query results not returning RRS feed

  • Question

  • I am having an issue with  WMI and executing the query that is involved with it. I am connecting to a remote server which I can authenticate too but my WMI query is not returning results.

    Here is what I have:

     

    'WMI CONSTANT VALUES
    '=====================================
    Const WbemAuthenticationLevelDefault = 0
    Const WbemAuthenticationLevelNone = 1
    Const WbemAuthenticationLevelConnect = 2
    Const WbemAuthenticationLevelCall = 3
    Const WbemAuthenticationLevelPkt = 4
    Const WbemAuthenticationLevelPktIntegrity = 5
    Const WbemAuthenticationLevelPktPrivacy = 6
    
    
    
    Set objwmi = objLocator.ConnectServer(strComputer, "root\default", _
    "ent\" & srv_user, srv_password) 
    objwmi.Security_.ImpersonationLevel = 3
    objwmi.Security_.AuthenticationLevel = 6
    
    
    
    Set MemberRefCollection = objwmi.ExecQuery("SELECT * FROM Win32_GroupUser WHERE GroupComponent = ""Win32_Group.Domain='BUILTIN',Name='Administrators'""")
    
    For Each MemberRef In MemberRefCollection
            
      Set MemberObject = objwmi.Get(MemberRef.PartComponent)
      strname = MemberObject.Name
    
    Next



    JP
    Sunday, September 4, 2011 3:38 PM

Answers

All replies