English 中文(简体)
WMI Access Denied while Win32_Service query
原标题:
  • 时间:2011-04-25 09:44:02
  •  标签:
  • wmi
  • wmic

I m using WMI to retrieve REMOTE computer services. To check the results I try WMIC like:

WMIC /NODE:"hostname" /USER:"login" /PASSWORD:"pwd" OS

WMIC /NODE:"hostname" /USER:"login" /PASSWORD:"pwd" SERVICE etc.

Everything s fine on Win server 2k3 machines. But on a new Win server 2k8 it works everything but not SERVICE alias - I just get "0x80041003 Access Denied". I ve got this error while remote query (there s no error if I query the SERVICE locally on the server itself).

My user is a admin on this server. I ve check Local Security Policies, give permission to the user from root/CIMV2 namespace for remoteEnable, DCOM permission for Remote Access, Remote Lunch, Remote Activation. I ve try to enable logging but couldn t find any usefull info. I ve read tens articles on this theme but couldn t find answer either.

Here http://technet.microsoft.com/en-us/library/ee692772.aspx I ve read: "0x80041003 (WBEM_E_ACCESS_DENIED) This typically results when the process trying to access the namespace does not have the required WMI privileges. The account attempting remote access should be an administrator on the target computer; in addition, the account might need to have a specific privilege enabled. To troubleshoot this error, check the namespace security on the remote namespace to see the privileges enabled for the account."

So, I ve done all recommended action with no result.

WHY I can successfully query all aliases (means the user has all necessary rights) but not SERVICE? Now I already don t have any ideas and ask for help.

问题回答

暂无回答




相关问题
How can I query NTFS disk quotas in C#?

I need to be able to find, for all users on a given remote machine, those users disk quotas and actual disk usage. I need to be able to do this reporting in a C# application. (Well, technically a DLL ...

WMI Poor Performance

I wrote a code in C# that maps logical drives to their physical disks, using WMI (System.Management). The code working perfectly, but slow like hell. In my machine (Windows 7 x64, Dual-Core with 3 GB ...

Closing Open Files using C#

I have a situation where people are connected to files on a share and it s blocking me from overwriting the file. I m trying to write a method that will look to see if a filePath that I provide is ...

Binding an SSL certificate to a port programmatically

I m working on a self-hosted WCF service for which encrypted communications is an option. Everything works fine when a certificate is already bound to the port as described here. However, I want to ...

热门标签