Reputation: 85
I have a share hosted on another computer FILESERVER1
at \\FILESERVER1\FILESHARE1
.
How do I view the Share Permissions of this folder using PowerShell? Is this possible?
Please note, I am NOT referring to NTFS permissions.
Upvotes: 0
Views: 6507
Reputation: 2384
Get-SmbShare and Get-SmbShareAccess seem to be what you want, as long as you have PowerShell 5. Those commands are not present on a Windows 7/PSh4 computer I'm using.
You can run the commands on the remote computer by using a session:
$s = New-PsSession -ComputerName FILESERVER1
Invoke-Command -Session $s {Get-SmbShare}
Invoke-Command -Session $s {Get-SmbShareAccess 'FILESHARE1'}
Upvotes: 1