Question

Show size of folders using powershell

By jcwfbi ·
I have a task I need to do, which is get a list of user profiles and show how large the profile folders are in size, preferably megabytes or what ever. I am a bit rusty on getting this info and hoping someone can help with the right direction. I have the following so far, not much but yeah..


$directory = Get-Item -Path "C:\users"

$directory | Get-ChildItem

So this gives me all the profiles on the machine, and if I do like a $directory[0].fullname I can bring up the full path to the profile. But that is all I found, I know I done this before but need refresh

I'm wanting to do a foreach, and list the following in each:

Profile fullname, Total objects in profile, Size of profile, in a table format

If anyone knows of any good articles I can read and follow, or if you got any tips to help me further that would be appreciated.

Thank You
1 total post (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Back to Windows Forum
1 total post (Page 1 of 1)  

Related Discussions

Related Forums