This isn’t going to be a coherent post really (unlike my usual posts which are more coherent, I hope!). I came across a bunch of new stuff as I was troubleshooting this WMI issue and thought I should put them all somewhere.
The issue is that we are trying to get Solarwinds to monitor one of our DMZ servers via WMI but it keeps failing.
Other servers in the DMZ work, it’s just this one that fails. WMI ports aren’t fixed like I had mentioned earlier but I don’t think that matters coz they aren’t fixed for the other servers either. Firewall configuration is the same between both servers.
I thought of running Microsoft Network Monitor but realized that it’s been replaced with Microsoft Message Analyzer. That looks nice and seems to do a lot more than just network monitoring – I must explore it sometime. For now I ran it on the DMZ and applied a filter to see traffic from our Solarwinds server to it. The results showed that access was being denied, so may not a port issue after all.
Reading up more on this pointed me to a couple of suggestions. None of them helped but I’d like to mention them here for future reference.
First up is the command
wbemtest. Run this from the local machine (the DMZ server in my case), click “Connect”, and then “Connect” again.
If all is well with WMI you should get no error.
Now try the same from the Solarwinds server, but this time try connecting to the DMZ server and enter credentials if any.
That worked with the local administrator account but failed with the account I was using from Solarwinds to monitor the server.
So now I know the issue is one of permissions and not ports.
Another tool that can be used is WmiMgmt. Just type
wmimgmt.msc somewhere to launch it. I tried this on the DMZ machine to confirm WMI works fine. I also tried it from SolarWinds machine to the DMZ machine. (Right click to connect to a remote computer).
Problem with WmiMgmt is that unlike
wbemtest you can’t a different account to use. If the two machines are domain joined or have the same local accounts, then it’s fine – you can run as from one machine and connect to the other – but otherwise there’s nothing much you can do. WmiMgmt is good to double check the permissions though. Click “Properties” in the screenshot above, go to the “Security” tab, select the “Root” namespace and click the “Security” button. The resulting window should show the permissions.
In my case the Administrators group members had full permissions as expected. The account I was using from the Solarwinds server was a member of this group too yet had access denied.
Another place to look at is Component Services > Computers > My Computer > DCOM Config > “Windows Management and Instrumentation” – right click and “Properties”.
Make sure “Authentication Level” is “Default”. Then go to the “Security” tab and make sure the account/ group you want has permissions.
Also right click on “My Computer” and go to “Properties”.
Under the “COM Security” tab go to the “Edit Limits” of both access & launch and activation permissions and ensure the permissions are correct. My understanding is that the limits you specify here over-ride everything else.
In my case none of the above helped as they were all identical between both servers and at the correct setting. What finally helped was this Serverfault post.
Being DMZ servers these were on a workgroup and the Solarwinds server was connecting via a local account. Turns out that:
In a workgroup, the account connecting to the remote computer is a local user on that computer. Even if the account is in the Administrators group, UAC filtering means that a script runs as a standard user.
That is a good link to refer to. It is about Remote UAC and WMI. The solution is to go to the following registry key –
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System – and create a new name called
LocalAccountTokenFilterPolicy (of type
DWORD_32) with a value of
1. (Check the Serverfault post for one more solution if you are using a Server 2012).
Remote UAC. Ah! Am surprised I didn’t think of that in the beginning itself. If the
LocalAccountTokenFilterPolicy has a value of 0 (the default) then whenever a member of the Administrators group connects remotely, the security tokens of that account and filtered to remove admin access. This is only for local admin accounts, not domain admin accounts – mind you. If
LocalAccountTokenFilterPolicy has a value of 1, then no filtering happens and the account connects with full admin rights. I have encountered Remote UAC in the past when accessing admin shares (e.g.
\\computer\drive$) in my home workgroup, never thought it would be playing a role here with WMI!
Hope this helps someone. :)