Ferfa
Ferfa

Reputation: 221

How to list all users access on folder?

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

Upvotes: 4

Views: 24225

Answers (1)

Tim B
Tim B

Reputation: 31

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

Upvotes: 3

Related Questions