r/msp•
dbeta

Using Powershell to report on File Permissions

We've got a few clients wanting reports on permissions. So I made this powershell file to create human readable reports on file permissions, complete ready to run on any system that has file shares on it. Almost no customization needed for your org as a whole, and probably no customization needed per server.

It outputs a CSV of all permissions, and a TXT for every share. Excluding any permissions that are the same as their parent.

Please ignore the terrible code highlighting on my website. Going to spend some time tweaking CSS for that later, but it will do for now.

https://dbeta.com/2021/02/05/PoweshellSharePermissionsReport

If you want another way to do it, CyberDrain has a really good post too.

https://www.cyberdrain.com/documenting-with-powershell-chapter-5-file-share-permissions/

Posted Feb 5, 2021, 6:31 PM UTC

84
Lime-TeGekCommunity Contributor•

I'm really liking this method, not using external modules often is a lot harder but it looks to be pretty dang clean. Nice job.

2
dbetaOP•

Thanks. Feel free to use as much of it as you want. No secret sauce here. In the case, not using the external library you did didn't seem to make too big of a difference. I had to add just a little padding around the strange format of Get-ACL, but the data is there, and is good going back at least to Powershell 4.

The -depth option is a 5.1 thing though. We have all of our clients updated to it, so not a problem here, but I could see that causing people problems.

1
AccidentalMSPMSP - US•

This looks great!

2
dbetaOP•

Thanks. It got a few improvements post release thanks to u/Lime-TeGek. Might want to double check that you have the latest version posted. It was mostly about making it run smoother and look better though, nothing critical.

2