Workflow Tools Control Yard

Home / Logs

auditpol command builder

Choose what each subcategory of the Windows advanced audit policy should log, or start from one of Microsoft's recommendations, and copy the auditpol commands. The commands name each subcategory by its GUID, which auditpol takes in place of the name.

Comments in the commands
SubcategorySet toEvents it logs
Account Logon
{0cce923f-69ae-11d9-bed3-505054503030}4774, 4775, 4776, 4777
{0cce9242-69ae-11d9-bed3-505054503030}4768, 4771, 4772
{0cce9240-69ae-11d9-bed3-505054503030}4769, 4770
{0cce9241-69ae-11d9-bed3-505054503030}4649, 4778, 4779, 4800, 4801, 4802, 4803, 5378, 5632, 5633
Account Management
{0cce9239-69ae-11d9-bed3-505054503030}4783, 4784, 4785, 4786, 4787, 4788, 4789, 4790
{0cce9236-69ae-11d9-bed3-505054503030}4741, 4742, 4743
{0cce9238-69ae-11d9-bed3-505054503030}4744, 4745, 4746, 4747, 4748, 4749, 4750, 4751, 4752, 4753, 4759, 4760, 4761, 4762
{0cce923a-69ae-11d9-bed3-505054503030}4782, 4793
{0cce9237-69ae-11d9-bed3-505054503030}4727, 4728, 4729, 4730, 4731, 4732, 4733, 4734, 4735, 4737, 4754, 4755, 4756, 4757, 4758, 4764
{0cce9235-69ae-11d9-bed3-505054503030}4720, 4722, 4723, 4724, 4725, 4726, 4738, 4740, 4765, 4766, 4767, 4780, 4781, 4794, 5376, 5377
Detailed Tracking
{0cce922d-69ae-11d9-bed3-505054503030}4692, 4693, 4694, 4695
{0cce9248-69ae-11d9-bed3-505054503030}6416
{0cce922b-69ae-11d9-bed3-505054503030}4688, 4696
{0cce922c-69ae-11d9-bed3-505054503030}4689
{0cce922e-69ae-11d9-bed3-505054503030}5712
Token Right Adjustment
No GUID in Microsoft's table
Not set here4703
DS Access
{0cce923e-69ae-11d9-bed3-505054503030}4928, 4929, 4930, 4931, 4934, 4935, 4936, 4937
{0cce923b-69ae-11d9-bed3-505054503030}4662
{0cce923c-69ae-11d9-bed3-505054503030}5136, 5137, 5138, 5139, 5141
{0cce923d-69ae-11d9-bed3-505054503030}4932, 4933
Logon/Logoff
{0cce9217-69ae-11d9-bed3-505054503030}4625
{0cce9249-69ae-11d9-bed3-505054503030}4627
{0cce921a-69ae-11d9-bed3-505054503030}4978, 4979, 4980, 4981, 4982, 4983, 4984
{0cce9218-69ae-11d9-bed3-505054503030}4646, 4650, 4651, 4652, 4653, 4655, 4976, 5049, 5453
{0cce9219-69ae-11d9-bed3-505054503030}4977, 5451, 5452
{0cce9216-69ae-11d9-bed3-505054503030}4634, 4647
{0cce9215-69ae-11d9-bed3-505054503030}4624, 4625, 4648, 4675
{0cce9243-69ae-11d9-bed3-505054503030}6272, 6273, 6274, 6275, 6276, 6277, 6278, 6279, 6280
{0cce921c-69ae-11d9-bed3-505054503030}4649, 4778, 4779, 4800, 4801, 4802, 4803, 5378, 5632, 5633
{0cce921b-69ae-11d9-bed3-505054503030}4964
{0cce9247-69ae-11d9-bed3-505054503030}4626
Object Access
{0cce9222-69ae-11d9-bed3-505054503030}4665, 4666, 4667, 4668
{0cce9246-69ae-11d9-bed3-505054503030}4818
{0cce9221-69ae-11d9-bed3-505054503030}4868, 4869, 4870, 4871, 4872, 4873, 4874, 4875, 4876, 4877, 4878, 4879, 4880, 4881, 4882, 4883, 4884, 4885, 4886, 4887, 4888, 4889, 4890, 4891, 4892, 4893, 4894, 4895, 4896, 4897, 4898
{0cce9244-69ae-11d9-bed3-505054503030}5145
{0cce9224-69ae-11d9-bed3-505054503030}5140, 5142, 5143, 5144, 5168
{0cce921d-69ae-11d9-bed3-505054503030}4664, 4985, 5051
{0cce9226-69ae-11d9-bed3-505054503030}5031, 5140, 5150, 5151, 5154, 5155, 5156, 5157, 5158, 5159
{0cce9225-69ae-11d9-bed3-505054503030}5152, 5153
{0cce9223-69ae-11d9-bed3-505054503030}4656, 4658, 4690
{0cce921f-69ae-11d9-bed3-505054503030}4659, 4660, 4661, 4663
{0cce9227-69ae-11d9-bed3-505054503030}4671, 4691, 4698, 4699, 4700, 4701, 4702, 5148, 5149, 5888, 5889, 5890
{0cce921e-69ae-11d9-bed3-505054503030}4657, 5039
{0cce9245-69ae-11d9-bed3-505054503030}4656, 4658, 4663
{0cce9220-69ae-11d9-bed3-505054503030}4659, 4660, 4661, 4663
Policy Change
{0cce9230-69ae-11d9-bed3-505054503030}4713, 4716, 4717, 4718, 4739, 4864, 4865, 4866, 4867
{0cce9231-69ae-11d9-bed3-505054503030}4704, 4705, 4706, 4707, 4714
{0cce9233-69ae-11d9-bed3-505054503030}4709, 4710, 4711, 4712, 5040, 5041, 5042, 5043, 5044, 5045, 5046, 5047, 5048, 5440, 5441, 5442, 5443, 5444, 5446, 5448, 5449, 5450, 5456, 5457, 5458, 5459, 5460, 5461, 5462, 5463, 5464, 5465, 5466, 5467, 5468, 5471, 5472, 5473, 5474, 5477
{0cce9232-69ae-11d9-bed3-505054503030}4944, 4945, 4946, 4947, 4948, 4949, 4950, 4951, 4952, 4953, 4954, 4956, 4957, 4958
{0cce9234-69ae-11d9-bed3-505054503030}4670, 4909, 4910, 5063, 5064, 5065, 5066, 5067, 5068, 5069, 5070, 5447, 6144, 6145
{0cce922f-69ae-11d9-bed3-505054503030}4715, 4719, 4817, 4902, 4904, 4905, 4906, 4907, 4908, 4912
Privilege Use
{0cce9229-69ae-11d9-bed3-505054503030}4672, 4673, 4674
{0cce922a-69ae-11d9-bed3-505054503030}None listed
{0cce9228-69ae-11d9-bed3-505054503030}4672, 4673, 4674
System
{0cce9213-69ae-11d9-bed3-505054503030}4960, 4961, 4962, 4963, 4965, 5478, 5479, 5480, 5483, 5484, 5485
{0cce9214-69ae-11d9-bed3-505054503030}5024, 5025, 5027, 5028, 5029, 5030, 5032, 5033, 5034, 5035, 5037, 5058, 5059, 6400, 6401, 6402, 6403, 6404, 6405, 6406, 6407, 6408
{0cce9210-69ae-11d9-bed3-505054503030}4608, 4609, 4616, 4621
{0cce9211-69ae-11d9-bed3-505054503030}4610, 4611, 4614, 4622, 4697
{0cce9212-69ae-11d9-bed3-505054503030}4612, 4615, 4618, 4816, 5038, 5056, 5057, 5060, 5061, 5062, 6281

Run as an administrator. The first line saves the policy as it is now.

Then check, and if need be put the saved policy back:

How the commands work

auditpol /set /subcategory:"{GUID}" /success:enable /failure:disable sets one subcategory of the system audit policy. auditpol takes a subcategory's name in quotation marks or its GUID; this page uses GUIDs. A command that names only /success leaves failure auditing as it was, and the other way round, so each line here names both. auditpol /backup /file:... saves the system and per-user policy and the auditing options to a CSV file, and auditpol /restore /file:... loads such a file back. auditpol /get /category:* shows the whole system policy, and auditpol /list /subcategory:* /v lists the subcategories with their GUIDs as the computer knows them.

The same settings are in Group Policy, under Computer Configuration, Windows Settings, Security Settings, Advanced Audit Policy Configuration, System Audit Policies, and in the Local Security Policy snap-in (secpol.msc).

Microsoft's recommendations

The presets above come from these tables of Microsoft's system audit policy recommendations: what Windows logs by default, a baseline for computers with average security needs, and a stronger setting to help detect compromise. A blank cell means no recommendation, and the preset leaves that subcategory as it is. Settings for domain controllers apply only when the box for a domain controller is ticked; the rows marked If needed and the one with a single value are not applied. Microsoft asks that any policy be reviewed and tested before it goes into production. Since Windows 10 version 1809, Logon is audited for success and failure by default; before, only for success.

Windows client editions

SubcategoryWindows defaultBaselineStronger
Account Logon
Credential ValidationNo auditingSuccessSuccess and failure
Kerberos Authentication ServiceSuccess and failure
Kerberos Service Ticket OperationsSuccess and failure
Other Account Logon EventsSuccess and failure
Account Management
Application Group Management
Computer Account ManagementSuccessSuccess and failure
Distribution Group Management
Other Account Management EventsSuccessSuccess and failure
Security Group ManagementSuccessSuccess and failure
User Account ManagementSuccessSuccessSuccess and failure
Detailed Tracking
DPAPI ActivitySuccess and failure
Process CreationSuccessSuccess and failure
Process Termination
RPC Events
DS Access
Detailed Directory Service Replication
Directory Service Access
Directory Service Changes
Directory Service Replication
Logon/Logoff
Account LockoutSuccessSuccess
IPsec Extended Mode
IPsec Main ModeIf needed
IPsec Quick Mode
LogoffSuccessSuccessSuccess
LogonSuccess and failureSuccess and failureSuccess and failure
Network Policy ServerSuccess and failure
Other Logon/Logoff
Special LogonSuccessSuccessSuccess and failure
User/Device Claims
Object Access
Application Generated
Central Access Policy Staging
Certification Services
Detailed File Share
File Share
File System
Filtering Platform Connection
Filtering Platform Packet Drop
Handle Manipulation
Kernel Object
Other Object Access
Registry
Removable Storage
SAM
Policy Change
Authentication Policy ChangeSuccessSuccessSuccess and failure
Authorization Policy Change
Filtering Platform Policy Change
MPSSVC Rule-Level Policy ChangeYes (one value only)
Other Policy Change Events
Audit Policy ChangeSuccessSuccess and failureSuccess and failure
Privilege Use
Non Sensitive Privilege Use
Other Privilege Use Events
Sensitive Privilege Use
System
IPsec DriverSuccess and failureSuccess and failure
Other System EventsSuccess and failure
Security State ChangeSuccessSuccess and failureSuccess and failure
Security System ExtensionSuccess and failureSuccess and failure
System IntegritySuccess and failureSuccess and failureSuccess and failure

Windows Server

SubcategoryWindows defaultBaselineStronger
Account Logon
Credential ValidationNo auditingSuccess and failureSuccess and failure
Kerberos Authentication ServiceSuccess and failure
Kerberos Service Ticket OperationsSuccess and failure
Other Account Logon EventsSuccess and failure
Account Management
Application Group Management
Computer Account ManagementSuccess; failure on domain controllersSuccess and failure
Distribution Group Management
Other Account Management EventsSuccess and failureSuccess and failure
Security Group ManagementSuccess and failureSuccess and failure
User Account ManagementSuccessSuccess and failureSuccess and failure
Detailed Tracking
DPAPI ActivitySuccess and failure
Process CreationSuccessSuccess and failure
Process Termination
RPC Events
DS Access
Detailed Directory Service Replication
Directory Service AccessSuccess and failure on domain controllersSuccess and failure on domain controllers
Directory Service ChangesSuccess and failure on domain controllersSuccess and failure on domain controllers
Directory Service Replication
Logon/Logoff
Account LockoutSuccessSuccess
IPsec Extended Mode
IPsec Main ModeIf needed
IPsec Quick Mode
LogoffSuccessSuccessSuccess
LogonSuccess and failureSuccess and failureSuccess and failure
Network Policy ServerSuccess and failure
Other Logon/LogoffSuccess and failure
Special LogonSuccessSuccessSuccess and failure
User/Device Claims
Object Access
Application Generated
Central Access Policy Staging
Certification Services
Detailed File Share
File Share
File System
Filtering Platform Connection
Filtering Platform Packet Drop
Handle Manipulation
Kernel Object
Other Object Access
Registry
Removable Storage
SAM
Policy Change
Authentication Policy ChangeSuccessSuccessSuccess and failure
Authorization Policy Change
Filtering Platform Policy Change
MPSSVC Rule-Level Policy ChangeYes (one value only)
Other Policy Change Events
Audit Policy ChangeSuccessSuccess and failureSuccess and failure
Privilege Use
Non Sensitive Privilege Use
Other Privilege Use Events
Sensitive Privilege Use
System
IPsec DriverSuccess and failureSuccess and failure
Other System EventsSuccess and failure
Security State ChangeSuccessSuccess and failureSuccess and failure
Security System ExtensionSuccess and failureSuccess and failure
System IntegritySuccess and failureSuccess and failureSuccess and failure

Categories

/category: takes a category's name or GUID and sets every subcategory in it.

CategoryGUID
Account Logon{69979850-797a-11d9-bed3-505054503030}
Account Management{6997984e-797a-11d9-bed3-505054503030}
Detailed Tracking{6997984c-797a-11d9-bed3-505054503030}
DS Access{6997984f-797a-11d9-bed3-505054503030}
Logon/Logoff{69979849-797a-11d9-bed3-505054503030}
Object Access{6997984a-797a-11d9-bed3-505054503030}
Policy Change{6997984d-797a-11d9-bed3-505054503030}
Privilege Use{6997984b-797a-11d9-bed3-505054503030}
System{69979848-797a-11d9-bed3-505054503030}

Sources

More Logs tools