Hans van Leeuween
Hans van Leeuween

Reputation: 31

Windows command wmic give Access is denied

A Windows server 2008 R2 with the name "delta" use Workgroup "WORKGROUP" (So is not a member of a domain). On system "delta", beside account "administrator", another account "sysadmin" is created with account type Administrator. The other Windows system has the name "gamma". It is possible to access the system "delta" from system "gamma" with remote desktop. This access succeeds both with the accounts "administrator" and "sysadmin" and the corresponding passwords. From system "gamma", with the command, "wmic" data can be requested from system "delta". This works correctly with account "administrator".

C:>wmic
wmic:root\cli>/node:delta /user:administrator /password:xxxxx cpu get name
Name
Intel(R) Xeon(R) CPU E3-1220 V2 @ 3.10GHz

For account "sysadmin" the command "Dcomcnfg" is started on system "delta". Expand Component Service – Computers – My computer Open the properties of My Computer and select “COM Security” tab. Under COM Security, click "Edit Limits" for "Access Permissions". The account "sysadmin" got "Remote Access". Click "Edit Limits" for "Launch and Activation Permissions". The account "sysadmin" got "Remote Launch" and "Remote Activation" permissions.

Expand Component Service – Computers – My computer - CDOM Config Open the properties of "Windows Management and Instrumentation". Choice tab "Security" Click "Edit" for "Launch and Activation Permissions". The account "sysadmin" got "remote Launch" and "Remote Activation" permissions. Click "Edit" for "Access Permissions". The account "sysadmin" got "Remote Access" permissions.

Still, I get "Access is denied" with wmic from system "gamma" to system "delta".

C:>wmic
wmic:root\cli>/node:delta /user:sysadmin /password:yyyyy cpu get name
Node - delta

ERROR: Description = Access is denied

How can I solve this problem?

Upvotes: 1

Views: 10044

Answers (1)

Hans van Leeuween
Hans van Leeuween

Reputation: 31

I solved this problem by adding permission to account "sysadmin" on system "delta" with the tools "dcomcnfg" and "wmimgmt.msc".

DCOM permission

  1. Open Dcomcnfg
  2. Expand Component Service -> Computers -> My computer
  3. Go to the properties of My Computer
  4. Select the COM Security Tab
  5. Click on "Edit Limits" under Access Permissions.
  6. Click "Add" and add user "sysadmin".
  7. Give user "sysadmin" the "Local Access" and "Remote Access" permission.
  8. Click on the "Edit Limit" for the launch and activation permissions,
  9. Click "Add" and add user "sysadmin".
  10. Give user "sysadmin" the "Remote Launch" and "Remote Activation" permission.

  11. Open WMImgmt.msc

  12. Go to the Properties of WMI Control
  13. Go to the Security Tab
  14. Select "Root" "CIMV2" and open "Security"
  15. Add user "sysadmin"
  16. Ensure "sysadmin" has "Execute Methods", "Provider Write" and "Enable Account" right; ensure Administrators has all permission.

Upvotes: 2

Related Questions