text stringlengths 0 4.23k |
|---|
/set |
Adds a new entry to or updates an existing entry in the resource SACL for the resource type specified. |
/remove |
Removes all entries for the given user in the global object access auditing list. |
/clear |
Removes all entries from the global object access auditing list. |
/view |
Lists the global object access auditing entries in a resource SACL. The user and resource types are optional. |
/? |
Displays help at the command prompt. |
Arguments |
Argument |
Description |
/type |
The resource for which object access auditing is being configured. The supported, case-sensitive, argument values are File (for directories and files) and Key (for registry keys). |
/success |
Specifies success auditing. |
/failure |
Specifies failure auditing. |
/user |
Specifies a user in one of the following forms: DomainName\Account (such as DOM\Administrators)StandaloneServer\Group Account (see LookupAccountName function){S-1-x-x-x-x} (x is expressed in decimal, and the entire SID must be enclosed in curly braces). For example: {S-1-5-21-5624481-130208933-164394174-1001}Note: If the SID form is used, no check is done to verify the existence of this account. |
/access |
Specifies a permission mask that can be specified through:Generic access rights, including:GA - GENERIC ALLGR - GENERIC READGW - GENERIC WRITEGX - GENERIC EXECUTEAccess rights for files, including:FA - FILE ALL ACCESSFR - FILE GENERIC READFW - FILE GENERIC WRITEFX - FILE GENERIC EXECUTEAccess rights for registry keys, including:KA - KEY ALL ACCESSKR - KEY READKW - KEY WRITEKX - KEY EXECUTEFor example: /access:FRFW enables audit events for read and write operations.A hexadecimal value representing the access mask (such as 0x1200a9)This is useful when using resource-specific bit masks that are not part of the security descriptor definition language (SDDL) standard. If omitted, Full access is used. |
Note: If the SID form is used, no check is done to verify the existence of this account. |
Generic access rights, including:GA - GENERIC ALLGR - GENERIC READGW - GENERIC WRITEGX - GENERIC EXECUTEAccess rights for files, including:FA - FILE ALL ACCESSFR - FILE GENERIC READFW - FILE GENERIC WRITEFX - FILE GENERIC EXECUTEAccess rights for registry keys, including:KA - KEY ALL ACCESSKR - KEY READKW - KEY WRITEKX - KEY EXECUTEFor example: /access:FRFW enables audit events for read and write operations.A hexadecimal value representing the access mask (such as 0x1200a9)This is useful when using resource-specific bit masks that are not part of the security descriptor definition language (SDDL) standard. If omitted, Full access is used. |
Access rights for files, including:FA - FILE ALL ACCESSFR - FILE GENERIC READFW - FILE GENERIC WRITEFX - FILE GENERIC EXECUTEAccess rights for registry keys, including:KA - KEY ALL ACCESSKR - KEY READKW - KEY WRITEKX - KEY EXECUTEFor example: /access:FRFW enables audit events for read and write operations.A hexadecimal value representing the access mask (such as 0x1200a9)This is useful when using resource-specific bit masks that are not part of the security descriptor definition language (SDDL) standard. If omitted, Full access is used. |
Access rights for registry keys, including:KA - KEY ALL ACCESSKR - KEY READKW - KEY WRITEKX - KEY EXECUTEFor example: /access:FRFW enables audit events for read and write operations.A hexadecimal value representing the access mask (such as 0x1200a9)This is useful when using resource-specific bit masks that are not part of the security descriptor definition language (SDDL) standard. If omitted, Full access is used. |
For example: /access:FRFW enables audit events for read and write operations.A hexadecimal value representing the access mask (such as 0x1200a9)This is useful when using resource-specific bit masks that are not part of the security descriptor definition language (SDDL) standard. If omitted, Full access is used. |
/access:FRFW |
A hexadecimal value representing the access mask (such as 0x1200a9)This is useful when using resource-specific bit masks that are not part of the security descriptor definition language (SDDL) standard. If omitted, Full access is used. |
This is useful when using resource-specific bit masks that are not part of the security descriptor definition language (SDDL) standard. If omitted, Full access is used. |
Examples |
To set a global resource SACL to audit successful access attempts by a user on a registry key: |
auditpol /resourceSACL /set /type:Key /user:MYDOMAIN\myuser /success |
To set a global resource SACL to audit successful and failed attempts by a user to perform generic read and write functions on files or folders: |
auditpol /resourceSACL /set /type:File /user:MYDOMAIN\myuser /success /failure /access:FRFW |
To remove all global resource SACL entries for files or folders: |
auditpol /resourceSACL /type:File /clear |
To remove all global resource SACL entries for a particular user from files or folders: |
auditpol /resourceSACL /remove /type:File /user:{S-1-5-21-56248481-1302087933-1644394174-1001} |
To list the global object access auditing entries set on files or folders: |
auditpol /resourceSACL /type:File /view |
To list the global object access auditing entries for a particular user that are set on files or folders: |
auditpol /resourceSACL /type:File /view /user:MYDOMAIN\myuser |
auditpol restore |
Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012 |
Restores system audit policy settings, per-user audit policy settings for all users, and all auditing options from a file that is syntactically consistent with the comma-separated value (CSV) file format used by the /backup option. |
To perform restore operations on the per-user and system policies, you must have Write or Full Control permission for that object set in the security descriptor. You can also perform restore operations if you have the Manage auditing and security log (SeSecurityPrivilege) user right, which is useful when restoring the security descriptor in the event of an error or malicious attack. |
Syntax |
auditpol /restore /file:<filename> |
Parameters |
Parameter |
Description |
/file |
Specifies the file from which the audit policy should be restored. The file must have been created by using the /backup option or must be syntactically consistent with the CSV file format used by the /backup option. |
/? |
Displays help at the command prompt. |
Examples |
To restore system audit policy settings, per-user audit policy settings for all users, and all auditing options from a file named auditpolicy.csv that was created by using the /backup command, type: |
auditpol /restore /file:c:\auditpolicy.csv |
auditpol set |
Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012 |
Sets the per-user audit policy, system audit policy, or auditing options. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.