PowerTip: Use PowerShell to Find Size of User Profile

PowerTip: Use PowerShell to Find Size of User Profile

  • Comments 3
  • Likes

Summary: Use Windows PowerShell to find the size of your user profile.

Hey, Scripting Guy! Question How can I use Windows PowerShell to find the size of my user profile and to see the size of the largest file in my profile?

Hey, Scripting Guy! Answer Use the Get-ChildItem cmdlet, recurse through your profile directory, pipe the results to
          the Measure-Object cmdlet, select the Length property, and add Sum and Maximum.
          This command measures the ED directory, and dir is an alias for Get-ChildItem:

PS C:\Users> dir .\ed -Recurse | Measure-Object -Property length -Sum -Maximum

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • OK, how do you do this for a lot of users in the Users folder--not just one? I'm trying to see who is hogging space on a shared server.

  • Joe did you figure out how to do it for more than one user at a time?

  • Hey guys, simply do a foreach loop on all folders within the "users" folder.