Get the Network Administrators tool pack

Subscribe to our newsletter and get 11 free network administrator tools, plus a 30 page user guide so you can get the most out of them.

Click Here to get your free tools

Recent Posts



How much space is free on your network?

Post image for How much space is free on your network?

by Steve Wiseman on June 14, 2012 · 9 comments

in Network Administrator,Tips,Tools


Elizabeth asked this week:

“Hi Steve, I have been using the free version of Network Administrator for quite a while and I really like it. I was wondering, is there any way you could use this to show me the percentage and amount of space that is free on the C drive of computers on my network?”

Great question Elizabeth.

We created a plugin that does exactly what you want. You can point it at any machine(s) you are interested in and let it rip:

Network Administrator Free Space Example

You can tell it to just show you the free space on the C Drive, or all drives:

Network Administrator Free Space

Network Administrator is a free download (Works on up to 3 computers at once). Get it from our download page.

What if you want to get this info on your own, using a script?

Let us see what VB Script can do for us.

Set sWMI = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\.\root\cimv2")
Set sDisks = sWMI.ExecQuery ("Select * from Win32_LogicalDisk Where DeviceID = 'C:'")

For Each sDisk in sDisks
 iFreeSpace = sDisk.FreeSpace
 WScript.Echo sDisk.DeviceID & " - " & sDisk.FreeSpace & " Bytes Free" & vbCrlf

The above script runs a query to find the C Drive, and get information about it.

It will show us how many bytes are free:

Free Space C Drive

What about all hard drives? If we make a slight change to our WMI query we can get all of them (The change is in bold):

Set sDisks = sWMI.ExecQuery ("Select * from Win32_LogicalDisk Where DriveType = 3")

Now, it shows the free space on all three hard drives on my computer:

Free Space All Drives

You could get the info remotely by using our free remote execute tool. If you saved your script as free.vbs, calling it would look like this:

RemoteExecute.exe -q -c -h -u user -p password c:\SomeFolder\Free.vbs

Put one of these for each IP you want to check in a bat file and you could get a quick look at your drive space across your network.

One more thing…Subscribe to my newsletter and get 11 free network administrator tools, plus a 30 page user guide so you can get the most out of them. Click Here to get your free tools

Related Articles:

{ 9 comments… read them below or add one }

1 Elizabeth L June 14, 2012 at 12:34 pm

Hi Steve,

I am so happy you guys made this plugin! I just purchased a copy. It is worth the $$. Thanks again for the great support, before I was even a customer 🙂

2 Matthew June 14, 2012 at 1:25 pm

Great addition to NA Steve. Thanks a ton.

3 Mike Lundquist June 14, 2012 at 1:57 pm

Awesome Steve. Just got the upgrade notification too, I purchased last year. Thanks to you and the team for all the great updates.

4 Angus Scott-Fleming June 14, 2012 at 2:27 pm

Put the VBS script in a shared folder and you don’t need to copy it to each computer’s “C:\SomeFolder” … assuming a common “user” and “password” across the network, you could even scan and log the whole shebang using one command like this:

for /L %%a in (1,1,255) do RemoteExecute.exe -q -c -h 192.168.1.%%a -u user -p password \\Server\SharedUtils\Free.vbs >> c:\User\Public\Documents\Logs\FreeSpace_%date:~4,2%-%date:~7,2%-%date:~10,4%.log

5 Steve Wiseman June 14, 2012 at 3:01 pm

Awesome tip Angus. Thanks for the post

6 Donut June 14, 2012 at 8:28 pm

Thanks for this tool steve, it is exactly what I have been looking for. Just a simple way to take a peek and see how much drive space I have free on all of my servers

7 Osvaldo June 20, 2012 at 12:14 pm

Getting error message only on the free drive space feature. Logon failure: unknown user name or bad password.

8 Steve Wiseman June 20, 2012 at 12:15 pm

Hello Osvaldo,

Got your email. I think this is a bug, and I will update this post when we get the issue resolved.

9 Steve Wiseman June 22, 2012 at 2:35 pm

Hi Everyone,

This was a bug with our remote execute engine. It was not properly passing the domain information. If you are still having this issue, please get the latest version from our download page. The build number in the top right should end with 155 or greater.

Leave a Comment

Category Links - Windows Forum - Exchange Forum