Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get disk space of the computer which is on local network?

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
0
0
I am trying to use this code:

set wmiService = GetObject ("winmgmts:\\localhost")
set disk = GetObject ("winmgmts:Win32_LogicalDisk='C:'")
WScript.Echo "Size = " + Disk.Size

For local computer it works just fine. But how do i change it to be able to get disk space from remote pc?
Any ideas?
 
Ron,

Curiously, I replaced "\\localhost" with my own machine name, and got the same number. Then I tried another machine on the net and got the same. Then I realized the number was slightly larger than my actual disk. I am not sure why any machine returns the size of my local.

Scott
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top