Windows – Configure account event auditing with Secedit

auditSecuritywindowswindows-server-2012

I'm currently putting together a number of PS scripts which can be run against a new webserver in order to harden it prior to it being placed in production.
One of these scripts will launch secedit and import a policy I have defined. My query is surrounding the [Event Audit] section of the policy inf file. It contains options for the various aspects to audit against, for instance:

[Event Audit]
AuditSystemEvents = 0
AuditLogonEvents = 0
AuditObjectAccess = 0
etc etc

From looking at this it would appear that I have two possible values; 1 or 0. My question is how do I set whether to log the Success, Failure or Success & Failure for each event?
Any pointers would be greatly appreciated.

Best Answer

I've since played around a bit and found the answer. There are 4 possible values for event audits:

  • 0 = No auditing
  • 1 = Success
  • 2 = Failure
  • 3 = Success, Failure

I hope this one day provides someone with a quick answer!