Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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
like image 496
Ferfa Avatar asked Oct 19 '25 22:10

Ferfa


1 Answers

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

like image 127
Tim B Avatar answered Oct 22 '25 15:10

Tim B



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!