Skip to content

Set-EPRDirectoryPermission

SYNOPSIS

Adds a access rule for an account to a directory.

SYNTAX

1
2
3
Set-EPRDirectoryPermission [-Account] <String> [-Path] <String> [[-Access] <String>]
 [[-InheritanceFlags] <String>] [[-PropagationFlags] <String>] [[-AccessControlType] <String>]
 [-ProgressAction <ActionPreference>] [<CommonParameters>]

DESCRIPTION

Set-EPRDirectoryPermission adds a access rule to the specified directory. By default the access rule added has the following settings:

  • FileSystemRights = Modify
  • InheritanceFlags = ContainerInherit,ObjectInherit
  • PropagationFlags = None
  • AccessControlType = Allow

EXAMPLES

EXAMPLE 1

1
Set-EPRDirectoryPermission -Account 'Domain\User' -Path 'D:\Easit\EPR-Test'

PARAMETERS

-Access

Specifies the type of operation associated with the access rule

1
2
3
4
5
6
7
8
9
Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 3
Default value: Modify
Accept pipeline input: False
Accept wildcard characters: False

-AccessControlType

Specifies whether to allow or deny the operation.

1
2
3
4
5
6
7
8
9
Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 6
Default value: Allow
Accept pipeline input: False
Accept wildcard characters: False

-Account

The name of a user account.

1
2
3
4
5
6
7
8
9
Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InheritanceFlags

Specifies how access masks are propagated to child objects.

1
2
3
4
5
6
7
8
9
Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 4
Default value: ContainerInherit,ObjectInherit
Accept pipeline input: False
Accept wildcard characters: False

-Path

Path to directory that the access rule should be added for.

1
2
3
4
5
6
7
8
9
Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProgressAction

Determines how PowerShell responds to progress updates generated by a script, cmdlet, or provider, such as the progress bars generated by the Write-Progress cmdlet. The Write-Progress cmdlet creates progress bars that show a command's status.

The ProgressAction parameter takes one of the ActionPreference enumeration values: SilentlyContinue, Stop, Continue, Inquire, Ignore, Suspend, or Break.

1
2
3
4
5
6
7
8
9
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PropagationFlags

Specifies how Access Control Entries (ACEs) are propagated to child objects.

1
2
3
4
5
6
7
8
9
Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

None - You cannot pipe objects to this function

OUTPUTS

None - This function does not produce any output

NOTES