Skip to content

Set Directory Permissions

Adds permissions for a specified user or group to a directory with a specified inheritance type.

Required

The full path of the directory - ex. C:\Program Files\Common Files

Required

The user or group to add permissions for - ex. Domain\User or $env:COMPUTERNAME\LocalGroupName or S-1-5-32-544 or BUILTIN\Users. Please add only one user or group.

Required — Default: Full Control

The permission to add Allowed values: Full Control, Modify, Read, Read And Execute, Execute File, Write, Delete.

Optional — Default: This folder, sub-folders and files

The inheritance type to use Allowed values: This folder only, This folder, sub-folders and files, This folder and sub-folders, This folder and files, Sub-folders and files only, Sub-folders only, Files only.

  • Category: Permissions
  • Brick ID: Directory-Add-Permission
{
"category": "permissions",
"description": "Adds permissions for a specified user or group to a directory with a specified inheritance type.",
"developerVendor": "CapaSystems A/S",
"displayName": null,
"id": "Directory-Add-Permission",
"name": "Set Directory Permissions",
"parameters": [
{
"defaultValue": "",
"defaultValueObject": null,
"description": "The full path of the directory - ex. C:\\Program Files\\Common Files",
"id": "Path",
"name": "Directory path",
"regExValidation": "",
"required": true,
"type": "TextBox",
"value": null,
"values": [],
"valuesObject": null
},
{
"defaultValue": "",
"defaultValueObject": null,
"description": "The user or group to add permissions for - ex. Domain\\User or $env:COMPUTERNAME\\LocalGroupName or S-1-5-32-544 or BUILTIN\\Users. Please add only one user or group.",
"id": "Identity",
"name": "User or group",
"regExValidation": "",
"required": true,
"type": "TextBox",
"value": null,
"values": [],
"valuesObject": null
},
{
"defaultValue": "",
"defaultValueObject": {
"id": "FullControl",
"name": "Full Control"
},
"description": "The permission to add",
"id": "Right",
"name": "Permission",
"regExValidation": "",
"required": true,
"type": "ComboBox",
"value": null,
"values": [],
"valuesObject": [
{
"id": "FullControl",
"name": "Full Control"
},
{
"id": "Modify",
"name": "Modify"
},
{
"id": "Read",
"name": "Read"
},
{
"id": "ReadAndExecute",
"name": "Read And Execute"
},
{
"id": "ExecuteFile",
"name": "Execute File"
},
{
"id": "Write",
"name": "Write"
},
{
"id": "Delete",
"name": "Delete"
}
]
},
{
"defaultValue": "",
"defaultValueObject": {
"id": "1",
"name": "This folder, sub-folders and files"
},
"description": "The inheritance type to use",
"id": "InheritanceType",
"name": "Inheritance type",
"regExValidation": "",
"required": false,
"type": "ComboBox",
"value": null,
"values": [],
"valuesObject": [
{
"id": "0",
"name": "This folder only"
},
{
"id": "1",
"name": "This folder, sub-folders and files"
},
{
"id": "2",
"name": "This folder and sub-folders"
},
{
"id": "3",
"name": "This folder and files"
},
{
"id": "4",
"name": "Sub-folders and files only"
},
{
"id": "5",
"name": "Sub-folders only"
},
{
"id": "6",
"name": "Files only"
}
]
}
],
"powershell": {
"base64Encoded": true,
"function": "ZnVuY3Rpb2..."
},
"type": "powerbrick",
"version": "2026.7.2.1"
}