API Reference
Command
Set-CxSacl
Sets a resource SACL (audit) from SDDL for File, Registry, or Service.
Examples
Example 1: Applies a folder audit descriptor to a local share path.
PS>
Set-CxSacl -Type File -Path 'D:\Shares\Finance' -Sddl 'S:(AU;OICI;FA;;;WD)'
Example 2: Updates the service SACL on a remote server after exporting a known-good descriptor.
PS>
Set-CxSacl -Type Service -ServiceComputerName APP01 -Name Schedule -Sddl 'S:(AU;SAFA;RPWPCCDCLCSWRCWDWOGA;;;BA)'
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-CxSacl -Type <File|Registry|Service> -Sddl <string> -Path <string> [<CommonParameters>]#Parameter set:
By PathParameters
- Type SaclKind
- Resource kind whose SACL should be updated. Possible values: File, Registry, Service
- Possible values:
File,Registry,Service - Sddl string
- Security descriptor definition language string to apply to the selected resource.
- Path string
- File system path to the target resource.
Outputs
System.Boolean
Set-CxSacl -Type <File|Registry|Service> -Sddl <string> [-ComputerName <string>] -KeyPath <string> [<CommonParameters>]#Parameter set:
By KeyPathParameters
- Type SaclKind
- Resource kind whose SACL should be updated. Possible values: File, Registry, Service
- Possible values:
File,Registry,Service - Sddl string
- Security descriptor definition language string to apply to the selected resource.
- ComputerName string
- Target computer name for registry SACL writes. Use . for the local machine or provide a DNS/NetBIOS name.
- KeyPath string
- Registry key path whose SACL should be updated.
Outputs
System.Boolean
Set-CxSacl -Type <File|Registry|Service> -Sddl <string> [-ServiceComputerName <string>] -Name <string> [<CommonParameters>]#Parameter set:
By NameParameters
- Type SaclKind
- Resource kind whose SACL should be updated. Possible values: File, Registry, Service
- Possible values:
File,Registry,Service - Sddl string
- Security descriptor definition language string to apply to the selected resource.
- ServiceComputerName string
- Target computer name for service SACL writes. Use . for the local machine or provide a DNS/NetBIOS name.
- Name string
- Name identifier for the target resource.
Outputs
System.Boolean