API Reference
Class
AclSacl
Helpers for reading and writing SACL (audit) information for files, registry keys, and services. Requires SeSecurityPrivilege to succeed.
Inheritance
- Object
- AclSacl
Methods
public static String GetFileSaclSddl(String path) #Returns:
StringGets the SACL SDDL for a file or directory. Returns null when privilege is missing or not readable.
Parameters
- path System.String
public static String GetRegistrySaclSddl(String computer, String fullPath) #Returns:
StringGets the SACL SDDL for a registry key (local or remote).
Parameters
- computer System.String
- fullPath System.String
public static String GetServiceSaclSddl(String computer, String serviceName) #Returns:
StringGets the SACL SDDL for a Windows service.
Parameters
- computer System.String
- serviceName System.String
public static Boolean SetFileSaclSddl(String path, String sddl) #Returns:
BooleanSets the SACL for a file or directory from SDDL. Returns true on success or idempotent match.
Parameters
- path System.String
- sddl System.String
public static Boolean SetRegistrySaclSddl(String computer, String fullPath, String sddl) #Returns:
BooleanSets the SACL for a registry key from SDDL.
Parameters
- computer System.String
- fullPath System.String
- sddl System.String
public static Boolean SetServiceSaclSddl(String computer, String serviceName, String sddl) #Returns:
BooleanSets the SACL for a Windows service from SDDL.
Parameters
- computer System.String
- serviceName System.String
- sddl System.String
Inherited Methods
public override Boolean Equals(Object obj) #Returns:
BooleanInherited from Object
Parameters
- obj Object