I have been searching this for long time. Now i have found out
dir -recurse | Where-Object { $_.PSIsContainer } | Get-Acl
dir -recurse - Is to get all folders and subfolders
$_.PSIsContainer - Is to check whether the object is a directory or a file
Get-ACL - to get ACLs for folders
No comments:
Post a Comment