Get Disk Usages for Folders in Win2k3 without permissions

windows-server-2003

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.

Best Answer

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...)