Is there a way to export the size of each local user profile My Documents and Desktop folder sizes for a list of computers?

Hello Experts,

We are trying obtain the folder sizes for every local user profile My documents and Desktop folders for every computer in an Excel spreadsheet. Is there a way to accomplish this via Powershell?
RCOtechAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
serialbandConnect With a Mentor Commented:
You could try du (disk usage) for windows.  http://technet.microsoft.com/en-us/sysinternals/bb896651.aspx

There's also windirstat https://windirstat.info/

There's a powershell script from  http://langexplr.blogspot.com/2007/03/implementation-of-du-s-in-powershell.html
function directory-summary($dir=".") { 
  get-childitem $dir | 
    % { $f = $_ ; 
        get-childitem -r $_.FullName | 
           measure-object -property length -sum | 
             select @{Name="Name";Expression={$f}},Sum}

Open in new window

0
 
RCOtechAuthor Commented:
thank you so much.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.