Hi, I need to get a list of users\groups who have access to a certain folders and the type of the permissions that they have. I have a script for getting the owners of the folder:
Text
$folders = Get-Content -Path C:\Temp\Book1.csvGET-ACL $folders | select path, Owner -expand access | select @{n=”Path”;e={$_.Path.replace(“Microsoft.PowerShell.Core\FileSystem::”,””)}}, Owner
And I have one for getting all the users that have access I use this:
Text
Get-Acl $folders | Format-List AccessToString
I need to build a script that will give me list of users or security groups that have access to a folder and then expand that user property to have also the user department information or manager.
I am struggling on how to do that user property part.
Does anyone have something similar? All suggestions are welcome.