Skip to content

Latest commit

History

History
56 lines (36 loc) 路 2.44 KB

11-Auditpol.md

File metadata and controls

56 lines (36 loc) 路 2.44 KB

Viewing, Enabling and Clearing Audit Policies using Auditpol

Auditpol is a command in Windows Server 2016, 2012 and 2008, and is required for querying or configuring audit policy at the subcategory level.

Auditpol displays the information on the performance and functions to manipulate audit policies.

Microsoft Documentation: https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/auditpol

Objectives

  • How to set the Audit Policies

Requisites

  • Windows Server 2016/2012 virtual machine.

syntax

Command Description
/set Sets the audit policy.
/get Displays the current audit policy.
/backup Saves the audit policy to a file.
/list Displays selectable policy elements.
/restore Restores the audit policy from a file that was previously created by using auditpol/backup.
/remove Removes all per-user audit policy settings and disables all system audit policy settings.
/clear Clears the audit policy.
/resourceSACL Configures global resource system access control lists (SALCs).

To view all the audit policies:

Launch Command Prompt from the Windows Server and type:
auditpol /get /category:*

auditpol-category

To enable the audit policies, type:
auditpol /set /category:"system", "account logon" /success:enable /failure:enable

auditpol-enable

To check whether audit policies are enable, type:
auditpol /get /category:*

auditpol-success-failure

To clear the audit policies, type:
auditpol /clear /y

auditclear

To check wheter audit policies cleared, type:
auditpol /get /category:*

audit-check-clear