We help IT Professionals succeed at work.

Powershell to list folder permission

AXISHK
AXISHK asked
on
Is it possible to write a powershell to list few folders ntfs permission (top level, not need for subfolder) , ?
Thx
Comment
Watch Question

von AxlSystem Engineer
Commented:
Get-ChildItem c:\windows | Get-ACL

Author

Commented:
Can we split the "Access" column" into separate users and remove the domain name  before each user ?

Thx
Technical Expert
Commented:
Didn't we already do this on another?

Are you wanting the output split up more than this?

$path = "C:\local"
$users = @()
$users = (get-acl $path).Access |select -expandproperty identityreference |% {$_.value.split('\')[1]}
$details = @()
$details = "" |select path, users
$details.path = $path
$details.users = $users

Open in new window