Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a bunch of user share folders ( home folders ) which I don't have access to. Is there a good tool that will show me how much space each folder is using without having permissions to view the files in the folder?

Basically I wanted an automated way to do this instead of right clicking each folder and going to the properties, even though I don't have access to it.

share|improve this question
Not an answer because I don't know for certain, but what about disk quotas? On Linux/Unix, if you enable quotas, root can see the sum total of a user's disk usage for the volumes with quota enabled, even if their quota is effectively unlimited. Maybe Windows does something similar? – James Sneeringer Jul 29 '09 at 13:55
Do have physical access to the box they reside on? – geeklin Jul 29 '09 at 14:05
I want to be able to do this while the machine is live. I am guessing I need a tool that runs as the system account? – Kyle Brandt Jul 29 '09 at 14:22
up vote 4 down vote accepted

If SYSTEM has permission grant then you can get a command-prompt as SYSTEM and run a utility from there. I happen to really like the TreeSize Free utility for quick ad hoc queries. If you want something for long-term reporting consider one of their non-free programs.

Getting a command-prompt as "SYSTEM" is fairly easy even in later Windows versions if you have access to PSTools and are running as Administrator (i.e. elevated or with UAC disabled in Windows Server 2008+): psexec -s cmd.exe

This is yet another reason why I prefer to leave "Administrators - Full Control" on all folders on server computers. It makes life easier.

You can use du for sure, though - the Windows version seems to leverage the SeBackupPrivilege to access file info regardless of ACLs! Grab the GNU CoreUtils, pull out du.exe and stick it either in the current directory or somewhere in the PATH, and from your SYSTEM command prompt, do a:

du -d 1 x:\your\directory\

I do this all the time in reporting user folder sizes. (And, honestly, I've gotten so used to having the UnxUtils distribution in the PATH on most of the servers that I administer that I forget that "du" isn't part of the OS...)

share|improve this answer
I would like it better than way too :-) I used to just samba mount it and use du :-) There is no way to do a samba mount as the system account is there? – Kyle Brandt Jul 29 '09 at 15:10

Try this software, you will need to run it from the machine you want stats on, but the UI is really clean.

share|improve this answer

You could also do this using Powershell. The below code makes a nice CSV file for you.

$startFolder = "c:\profiles"
$outputFile = "output.csv"

del $outputfile #Clear output file.

$colItems = (Get-ChildItem $startFolder | Where-Object {$_.PSIsContainer -eq $True})

"`"Folder Name`",`"Folder Size (in MB)`"" | out-file $outputFile -encoding ascii

foreach ($item in $colItems)
    	Write-Host "Getting size for `"$item`"..."
    	$subitems = (Get-ChildItem $item -recurse | Measure-Object -property length -sum)
    	$subitemsum = "`"{0:N2}" -f ($subitems.sum / 1MB) + "`""
    	$itemname = "`"" + $ + "`""
    	out-file $outputFile -InputObject "$($itemname),$($subitemsum)" -encoding ascii -Append
share|improve this answer
While zhis would list directory sizes, it still would require you to get the SeBackupPrivilege to get the correct size listed. Directory content which you do not have permission to access would not be included in the byte count. – the-wabbit Jul 11 '13 at 10:28

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.