Hey,
The previous answers face the NTFS-Permission.
For checking the SMB-Permission of the according SMB-Share you can try this:
$Directory = 'E:\\ServerFolder'
Get-SmbShare | Where {$_.Path -match $Directory} | Get-SmbShareAccess
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I want to get a list of shared folders and security permissions in this server directory e:\serverfolder
Hey,
The previous answers face the NTFS-Permission.
For checking the SMB-Permission of the according SMB-Share you can try this:
$Directory = 'E:\\ServerFolder'
Get-SmbShare | Where {$_.Path -match $Directory} | Get-SmbShareAccess
Hi,
You may try this
$directory = 'e:\\serverfolder'
Get-SmbShare | Where { $_.Path -match $directory } | Get-Acl | fl
Best Regards,
Ian Xue
============================================
If the Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
The get the shares on the machine: Get-SmbShare
To recursively get the permissions on directories and files:
get-childitem e:\serverfolder -recurse |
get-acl |
Format-List # or some other way of displaying the data