Get-FileSharePermission

Gets the sharing permissions on a file/SMB share.

Syntax

Get-FileSharePermission [-Name] <String> [[-Identity] <String>] [<CommonParameters>]

Description

The Get-FileSharePermission function uses WMI to get the sharing permission on a file/SMB share. It returns the permissions as a Carbon.Security.ShareAccessRule object, which has the following properties:

The ShareRights are values from the Carbon.Security.ShareRights enumeration. There are four values:

If the share doesn't exist, nothing is returned and an error is written.

Use the Identity parameter to get a specific user/group's permissions. Wildcards are supported.

Get-FileSharePermission was added in Carbon 2.0.

Related Commands

Parameters

Name Type Description Required? Pipeline Input Default Value
Name String

The share's name.

true false
Identity String

Get permissions for a specific identity. Wildcards supported.

false false

Return Values

Carbon.Security.ShareAccessRule.

EXAMPLE 1

Get-FileSharePermission -Name 'Build'

Demonstrates how to get all the permissions on the Build share.