How to list all users access on folder?

15,603

Iv'e found 2 commands that will give the answer, but I dont have the skill to stitch them together. I'm sure someone can help with that.

Identify the group permissions on a folder PS> get-acl G:\Sales\ | ForEach-Object { $_.Access } |Format-List IdentityReference

For a security group, identify all active members PS> Get-ADGroupMember -Identity "Sales Admin" -Recursive | Get-ADUser -Properties "Enabled" | Format-List Name

I believe Get-ADGroupMember is only available in Windows 10 and Server 2016

Share:
15,603
Ferfa
Author by

Ferfa

Updated on June 04, 2022

Comments

  • Ferfa
    Ferfa about 2 years

    I using Powershell NTFS module. My goal is to list all users have access on a folder.

    When i using:

    Get-Item "\\SharedFolder\MyFolder" | Get-NTFSAccess
    

    I see some user and 'user group" and I would like see all user inside this groups.

    For example all user access on MyFolder are:

    Bob
    John
    Technician_group
    

    Technician_group contain:

    Jennifer
    Andrea
    

    My goal is to have this result :

    Get-Item "\\SharedFolder\MyFolder" | Get-NTFSAccess
    Bob
    John
    Jennifer
    Andrea