API Reference
Command
Set-CxFilePermission
Sets exact rights for an identity on a file/directory (removes prior ACEs for that identity and type).
Examples
Example 1
Set-CxFilePermission -Path C:\\Tools\\app.exe -Identity DOMAIN\\Ops -Rights ReadAndExecute
Common Parameters
This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
For more information, see about_CommonParameters.
Syntax
Set-CxFilePermission -Path <string> -Identity <string> -Rights <ReadData> [-AccessType <Allow|Deny>] [-Inheritance <ContainerInherit|ObjectInherit|InheritOnly|NoPropagateInherit>] [<CommonParameters>]#Parameters
- Path string
- File system path to the target resource.
- Identity string
- Account or security identifier (SID) to apply.
- Rights FileSystemRights
- Access rights or permission mask to apply. Possible values: ReadData, ListDirectory, WriteData, CreateFiles, AppendData, CreateDirectories, ReadExtendedAttributes, WriteExtendedAttributes, ExecuteFile, Traverse, DeleteSubdirectoriesAndFiles, ReadAttributes, WriteAttributes, Delete, ReadPermissions, ChangePermissions, TakeOwnership, Synchronize, FullControl, Read, ReadAndExecute, Write, Modify
- Possible values:
ReadData,ListDirectory,WriteData,CreateFiles,AppendData,CreateDirectories,ReadExtendedAttributes,WriteExtendedAttributes,ExecuteFile,Traverse,DeleteSubdirectoriesAndFiles,ReadAttributes,WriteAttributes,Delete,ReadPermissions,ChangePermissions,TakeOwnership,Synchronize,FullControl,Read,ReadAndExecute,Write,Modify - AccessType AclAccessType
- Specifies whether access is Allowed or Denied. Possible values: Allow, Deny
- Possible values:
Allow,Deny - Inheritance AclInheritanceFlags
- Inheritance flags that control ACE propagation. Possible values: None, ContainerInherit, ObjectInherit, InheritOnly, NoPropagateInherit
- Possible values:
ContainerInherit,ObjectInherit,InheritOnly,NoPropagateInherit
Outputs
System.Boolean