Just FYI, you posted the same link twice.
Which machines work, and which don't? Is there a difference depending on the OS?
What error message(s) are you getting?
I would first make sure that the firewall on the remote machine is off, or at least customize the rules in a way that allows RPC traffic. Most new installations of Win7 have the firewall enabled by default, which would block any connections.
Then, make sure that the "Windows Management Instrumentation" service is running, though if that service were stopped now WMI capabilities would be available.
Finally, you need to make sure that you have proper access to the remote computer, but that is something that seems to be explained in the article you mentioned.
You may also need to set the ACL's for the object you are trying to query. See http://msdn.microsoft.com/en-us/library/aa374872%28v=vs.85%29.aspx
I've had to do this in the past for access to MS services, event logs, etc.
EDIT:
In a nutshell, you may need to set ACL's for the WMI objects you are trying to access, using an administrative account, before you can access them via an unprivileged account.
This is how I set it up in our environment:
Configure DCOM
- On the server to be managed click Start, click Run, type DCOMCNFG, and then click OK.
- In the Component Services dialog box, expand Component Services, expand Computers, and then right-click My Computer and click Properties.
- In the My Computer Properties dialog box, click the COM Security tab.
- Under Launch and Activation Permissions, click Edit Limits.
- In the Launch Permission dialog box, select 'Distributed COM Users'. In the Allow column under Permissions for User, select Remote Launch and select Remote Activation, and then click OK.
- Under Access Permissions, click Edit Limits.
- In the Access Permission dialog box, select 'Distributed COM Users'. In the Allow column under Permissions for User, select Remote Access, and then click OK.
- Add the user account to the Distributed COM Users Group in Computer Management, Local Users and Groups on the Server to be managed.
- Add the user account to the Performance Log Users Group in Computer Management, Local Users and Groups on the Server to be managed.
Configure WMI
- On the server to be managed click Start, click Run, type wmimgmt.msc, and then click OK.
- In the console tree, right-click WMI Control, and then click Properties.
- Click the Security tab.
- Select the Root namespace and then click Security.
- In the Security dialog box, click Add.
- In the Select Users, Computers, or Groups dialog box, enter the user account. Click the Check Names button to verify your entry and then click OK.
- In the Security dialog box, under Permissions, select 'Enable Account' and 'Remote Enable' for the user account.
- Ensure the permissions propagate to all subnamespaces.
Much of the above can be done (automated) using group policies.
Now to set the ACL's for services you can do something like:
sc sdshow SCMANAGER
... to get the the ACL for the service manager. This will take care of access to most windows services. You'll then want to add an ACL for the user account from above which will look something like the following:
sc sdset SCMANAGER
D:(A;;CC;;;AU)(A;;CCLCRPRC;;;IU)(A;;CCLCRPRC;;;SU)(A;;CCLCRPWPRC;;;SY)(A;;KA;;;BA)(A;;CCLCRPRC;;;S-1-5-21-000000000-0000000000-0000000000-0000)S:(AU;FA;KA;;;WD)(AU;OIIOFA;GA;;;WD)
... where the bold part is the UID of the user account making the request.
Event logs work a bit differently but you can use 'wevtutil' to set ACL's on them. Other objects may have different ways to set them as well.
Troubleshoot incrementally, first get queries working locally with your user account, then get them working remotely.
Best Answer
What about using
WMIC MEMORYCHIP
? There are quite a few options available under the diffent sub-commands (and sub-sub-commands for that matter.) Click HERE for a bit more of a walkthrough.