size and last modified attribute powershell command

is there any way via a powershell cmdlet or similar to audit a directory, and it return for all sub directories and the level below, the total size of that sub directory and all files within, and the last modified attribute that you get in windows explorer, and write the results to xlsx or csv. we have a file share which contains users home drives, and many of which appear to be of former staff which can be removed, but having a comprehensive report would be great.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Qlemo"Batchelor", Developer and EE Topic AdvisorCommented:
Though there are (a lot of) scripts out to collect size and date stats, it is usually much better to use tools like WinDirStat or TreesSize(Pro), because it allows interaction and recalculation (e.g. deleting a folder immediately corrects all stats for parent tree).
The modification time stamp of folders is not reliable, by the way.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
pma111Author Commented:
>The modification time stamp of folders is not reliable, by the way.

is there anything else you can do then to analyze when that folder was last accessed/amended, bar that attribute?
Qlemo"Batchelor", Developer and EE Topic AdvisorCommented:
The dates of the files contained in a folder are reliable.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.