$path = @()
$users = @()
$path = "D:\dept-home"
$details = New-Object System.Collections.ArrayList
get-childitem $path | foreach {If ($_.psiscontainer) {
$temp = "" | select "Folder", "Access"
$StrPath =
$temp.Folder = $_.Fullname
$users = (get-acl $_.FullName).Access |select -expandproperty identityreference |% {$_.value.split('\')[1]}
$temp.Access = $users
$details.Add($temp) | Out-Null
}}
write-output $details
$StrPath =
no point in it being there since not assigned to anything.$details |export-csv -path c:\temp\ACLexport.csv -notypeinformation
How can I archive this result ?
Thx