get-acl for all folders in a directory

is there anyway to use get-acl to get the ACL for all sub folders in a directory. That is as far down the structure as I want it to report, not every file and other folders in the sub folders, but just one level - written to excel CSV? It would be great if it could also include the size of the sub folders as well in MB.
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.

LBTechSolOperations DirectorCommented:
you can complete via powershell or the easy way: CJWDEV

pma111Author Commented:
thanks for the pointer on the tool, looks good. However I set a report running by selecting the share I am after and its gone straight into reporting on all the sub folders as well, I only really want the root folders in the path I specify as per the question, not as deep as the folder structure goes in each folder. the volume of data for approx 2000 home drives is going to be enourmous with all the sub folders within each
pma111Author Commented:
get-childitem \\server\share -recurse | Where-Object{($_.psiscontainer)} | Get-Acl | export-csv permissions.csv
Making Bulk Changes to Active Directory

Watch this video to see how easy it is to make mass changes to Active Directory from an external text file without using complicated scripts.

pma111Author Commented:
that command works like a charm
MacleanSystem EngineerCommented:
Here's an alternative that might help as well. But use what is easiest I'd say :)


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:
What would syntax be for icacls for all root level directories only on a share?
MacleanSystem EngineerCommented:
Gets a bit comprehensive at times. I would find out what my share root is, run the icacls c:\sharelocation\* /save aclfile /t and review the output.
You can then use the article to cross reference permissions and change it for root only, save it as a new file, then do a restore using new file. (Keep
However before doing any such thing make sure you got both backups, and the original aclfile saved somewhere so you can restore original permissions or files from either method in case something got its knickers in a twist.
I have not used the Powershell one myself, however if more intuitive I would use that. Whichever one is easiest to use generally gets my "thumbs up". And easiest depends on the eye of the beholder.
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.