In PowerShell when using Get-Acl how can I show all members belonging to a group instead of the group itself?
So:
Get-ChildItem C:\ | where-object {($_.PsIsContainer)} | Get-Acl | select path -ExpandProperty Access
Shows something like this:
Path : Microsoft.PowerShell.Core\FileSystem::C:\Test
FileSystemRights : FullControl
AccessControlType : Allow
IdentityReference : BUILTIN\Administrators
IsInherited : False
InheritanceFlags : ContainerInherit, ObjectInherit
PropagationFlags : None
Path : Microsoft.PowerShell.Core\FileSystem::C:\Test
FileSystemRights : ReadAndExecute, Synchronize
AccessControlType : Allow
IdentityReference : BUILTIN\Users
IsInherited : False
InheritanceFlags : ContainerInherit, ObjectInherit
PropagationFlags : None
Instead I want it to list all users belonging to Administrators/Users with their permission for each folder and discard the group.
Also how can I add Convert-Path to the select path statement so that path displayed is only C:\Test?
Thanks!