>I did not look at your code thoroughly but it is most likely to be a rights issue, you need to have enough rights, in both computers, to do this, which it is not easy to setup, I can't remember the details, but making the story short, the easiest and probably not the best way is to be a Domain Admin, otherwise setting up the rights for doing this was not easy (well, at least it was not easy when I did it like 10 years ago! wow, time flies... but even being an admin in both computers did not work if I remember correctly)
The second device is not a computer but simply a domain share drives. It has an IP address. The request is launched from the Web site. This is all under the same domain. It seems the domain has to be defined at the authority level. But, there is no way to identify the resource as is. I believe we can only get a list of resources of the device and scan until I find the one I want. Then, I can collect the information. Then, I can obtain the available disk space.