Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm trying to use WMI Explorer to query the root\MSCluster namespace on various hosts to obtain cluster resource group and resource object data. I can access the namespace with no issue on Win2K3 cluster nodes but am getting an access denied error attempting to connect to Win2K8 and Win2K8R2 nodes. I can access the root\cimv2 namespace with no issue, just the MSCluster namespace even though I am a local Admin. Is there a feature setting, local security policy or server role I have to be a member of to access the namespace? Thank you!

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

Not familiar with WMI Explorer, but does it let you specify the ImpersonationLevel?

Try the folling VBScript (not tested) on the local machine. Then edit the strComputer = "." line to be the server name and execute remotely:

On Error Resume Next

Dim strComputer
Dim objWMIService
Dim colClusterNodes
Dim objClusterNode

strComputer = "."

Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate,authenticationLevel=pktPrivacy}!\\" & strComputer & "\root\mscluster")
If Err.Number <> 0 Then
    WScript.Echo "ERROR : Failed to get WMI handle [" & Err.Description & "]"
    Err.Clear
Else

    Set colClusterNodes = objWMIService.ExecQuery( "Select * from MSCluster_Node")
    If Err.Number <> 0 Then
        WScript.Echo "ERROR : Failed to execute WMI query [" & Err.Description & "]"
        Err.Clear
    Else 

        For Each objClusterNode in colClusterNodes
            Wscript.Echo "Caption : " & objClusterNode.Caption
            Wscript.Echo "State   : " & objClusterNode.State
            Wscript.Echo "Status  : " & objClusterNode.Status
            WScript.Echo ""
    Next

        Set colClusterNodes = Nothing
    End If

    Set objWMIService = Nothing
End If
share|improve this answer
    
No apparant option to set it in WMI Explorer. I ran the script locally setting strComputer to the target server name and got an Error: Failed to Execute Query [Access Denied] error. I then RDP'd into the target, reverted back to "." and was getting the output for Caption and the other properties. –  MZDBA Aug 30 '12 at 21:49
    
OK, that proves that WMI itself is OK, and that the MSCluster namespace is being exposed correctly (I've seen the WMI repository get corrupted so many times!). The issue you have is definitely security related (which you suspected already). I've modded the script above, and added "authenticationLevel=pktPrivacy", can you re-test? –  Simon Catlin Sep 1 '12 at 15:42
    
Success! Setting AuthenticationLevel to PacketPrivacy did the trick. Thank you! –  MZDBA Sep 7 '12 at 18:21
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.