clear-host $MesACLs = get-acl "C:\Program Files" $ListeACL = @() ForEach ($OneACL in $MesACLs.Access) { $OneAclResult = New-Object -TypeName PSObject $MaVariable = [string] $OneACL.IdentityReference $OneAclResult | Add-Member -Type NoteProperty -Name IdentityReference -Value $OneACL.IdentityReference #$MaVariable $LongSamAccountName = [string] $OneACL.IdentityReference $SamAccountName = $LongSamAccountName.substring($LongSamAccountName.indexof("\")+1) $FullName = "" $FullName = Get-ADUser -Identity $SamAccountName | Select Name $OneAclResult | Add-Member -Type NoteProperty -Name FullName -Value $FullName.Name $ListeACL += $OneAclResult } $ListeACL | Format-Table