views:

977

answers:

1

We have various servers that have many directories shared. It's easy enough to look at the share browser to see what the "top level" shares are, but underneath is a jumbled mess of custom permissions, none of which is documented.

I'd like to enumerate all the shares on the domain (definitely all the 'servers', local PCs would be nice) and then recurse down each one and report any deviation from the parent. If the child has the same permissions, no need to report that back.

I'd prefer a simple script-y solution to writing a big C# app, but any method that works will do (even existing software).

For example, I'd like to get:

SERVER1\
 \-- C: (EVERYONE: Total control, ADMINs, etc. etc.)
   \-- (skip anything that is not the same as above)
   \-- SuperSecretStuff (Everyone: NO access; Bob: Read access)
SERVER2\ 
 \-- Stuff (some people)

etc.

+1  A: 

I know it isnt scripting, but have you tried ShareEnum? http://technet.microsoft.com/en-us/sysinternals/bb897442.aspx and then export it out? You can also compare to older runs. I don't think there is a cmd line interface (which sucks), but it will get you the info you need

ScaleOvenStove
It's neat but doesn't enumerate the subdirs of shares for different permissions levels. For example, on server A, we have D:\company shared. Deep within there D:\company\path\to\dir we have another directory with custom perms that doesn't show up in ShareEnum :(
Matt Rogish