My ultimate goal here is to remotely monitor the EstimatedChargeRemaining on a tablet PC. I have it mostly working, and it seems I can query almost anything BUT the battery!
On the tablet I can invoke "wmic path win32_battery get estimatedchargeremaining" and get the % charge remaining. I can also query cim_battery and get two records, one for a nonexistent optional battery, and one for the battery that's actually installed. On the remote desktop where I want to do the monitoring, running those queries returns "No Instance(s) Available", of course, because it doesn't have a battery. Here are the things I've checked and done so far to get remote WMI working:
- The firewall is OFF aon both machines.
- Enabled DCOM to get past the 0x80070005 access denied error.
- Granted "Remote Enable" on WMI namespaces to get past the 0x80041003 permission error.
Now, on the desktop, I can run wmic and set /node:IOS,MFS where IOS is the desktop and MFS is the tablet. Any queries I run subsequently will run on both nodes. I tested it with things like "path win32_bios get description" and "path win32_baseboard get manufacturer", and they both return appropriate different information for both nodes. (I know I could use the BIOS and BASEBOARD aliases, but I wanted to use path notation for consistency with my win32_battery queries, for which there is no alias.)
But, when I run "path win32_battery get estimatedchargeremaining" it returns "No Instance(s) Available" for both nodes! And "path cim_battery get estimatedchargeremaining" returns "No Instance(s) Available" for the desktop and just ONE record for the tablet, the one for the nonexistent optional battery! Why can't I query the actual installed battery?
I'm using the default /implevel:impersonate and /authlevel:pktprivacy. I tried specifying /user: with admin credentials on the tablet, but that didn't work. I've granted "Remote Enable" to everyone on the WMI namespaces \root, \cimv2, and \power. Of course I haven't exhaustively tried querying other objects, but everything I've tried works EXCEPT the one I really want! What's the secret sauce that I'm missing?