Link to home
Start Free TrialLog in
Avatar of ccs-support
ccs-support

asked on

Security/User Report on a domain Shared Folder - Active Directory

We have a server with a shared folder ( D:\company Shared Folders) - with about 50+/- sub-folders.
I need to obtain a User/Security list for this and all sub folders.  Basically, all I need is the name of the folder and users who can access. We don't care about read/write priv's at the moment.   I've tried many different GET-ACL command and having no luck.

Here is a sample of something I tried.  

" $table = @()
 
foreach ($acl in $(get-childitem C:\Company Shared Folders  | get-acl) ) {
 
foreach ($ace in $acl.GetAccessRules($true,$true,
 [system.security.principal.securityidentifier]) | select-object
 FileSystemRights, AccessControlType, IdentityReference) {
 $table += "$($acl.path),$($acl.path),$($ace.FileSystemRights),$
 ($ace.AccessControlType),$($ace.IdentityReference | %{$_.Translate
 ([System.Security.Principal.NTAccount])} )"
 }
 }
 $table | Set-Content test.csv "

Please help I'm starting to go insane.  This can't be this hard.  
ASKER CERTIFIED SOLUTION
Avatar of Larry Struckmeyer MVP
Larry Struckmeyer MVP
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial