Unluckily, the most different part of this task is the configuration of enabling remote WMI connection, not the program to get a disk space. Two error codes:
=> The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)
=> Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
I have spent much time on the first one and it seems there are some thing wrong with my config. Here are some steps I still remember:
1. Allow WMI to communicate through firewall
2. Enable "remote launch" and "remote activation" in Access Permission of Component Services
3. Enable "remote access" in Access Permission of Component Services
4. Enable "remote enable" in WMI Control Properties
You can simply test WMI connection by using wmic command
wmic /node:localhost /user:administrator /password:1234 bios get serialnumber
No comments:
Post a Comment