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 .securityi dentifier] ) | select-object
FileSystemRights, AccessControlType, IdentityReference) {
$table += "$($acl.path),$($acl.path) ,$($ace.Fi leSystemRi ghts),$
($ace.AccessControlType),$ ($ace.Iden tityRefere nce | %{$_.Translate
([System.Security.Principa l.NTAccoun t])} )"
}
}
$table | Set-Content test.csv "
Please help I'm starting to go insane. This can't be this hard.
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,
[system.security.principal
FileSystemRights, AccessControlType, IdentityReference) {
$table += "$($acl.path),$($acl.path)
($ace.AccessControlType),$
([System.Security.Principa
}
}
$table | Set-Content test.csv "
Please help I'm starting to go insane. This can't be this hard.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.