TestimoX

API Reference

Command

Set-CxSacl

Namespace ComputerX.PowerShell
Outputs
System.Boolean

Sets a resource SACL (audit) from SDDL for File, Registry, or Service.

Examples

Authored help example

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 Path

Parameters

Type SaclKind requiredposition: 0pipeline: falsevalues: 3
Resource kind whose SACL should be updated. Possible values: File, Registry, Service
Possible values: File, Registry, Service
Sddl string requiredposition: 1pipeline: false
Security descriptor definition language string to apply to the selected resource.
Path string requiredposition: 2pipeline: false
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 KeyPath

Parameters

Type SaclKind requiredposition: 0pipeline: falsevalues: 3
Resource kind whose SACL should be updated. Possible values: File, Registry, Service
Possible values: File, Registry, Service
Sddl string requiredposition: 1pipeline: false
Security descriptor definition language string to apply to the selected resource.
ComputerName string optionalposition: 2pipeline: false
Target computer name for registry SACL writes. Use . for the local machine or provide a DNS/NetBIOS name.
KeyPath string requiredposition: 3pipeline: false
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 Name

Parameters

Type SaclKind requiredposition: 0pipeline: falsevalues: 3
Resource kind whose SACL should be updated. Possible values: File, Registry, Service
Possible values: File, Registry, Service
Sddl string requiredposition: 1pipeline: false
Security descriptor definition language string to apply to the selected resource.
ServiceComputerName string optionalposition: 2pipeline: false
Target computer name for service SACL writes. Use . for the local machine or provide a DNS/NetBIOS name.
Name string requiredposition: 3pipeline: false
Name identifier for the target resource.

Outputs

System.Boolean