Configure the logging level (log level) for the certification authority event log

Some Windows events generated by the certification authority are only generated from a certain logging level.

The following describes how to determine and change the logging level of a certification authority.

The logging level is stored under the following registry key of the certification authority.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\CertSvc\Configuration\LogLevel

It can also be determined with the following command:

certutil -getreg CA\LogLevel

The default value is 3 (CERTLOG_WARNING).

Command prompt: certutil -getreg CA\LogLevel shows LogLevel REG_DWORD = 3

Do you know TameMyCerts? TameMyCerts is an add-on for the Microsoft certification authority (Active Directory Certificate Services). It extends the function of the certification authority and enables the application of rule sets to realize the secure automation of certificate issuance. TameMyCerts is unique in the Microsoft ecosystem, has already proven itself in countless companies around the world and is available under a free license. It can be downloaded via GitHub and used free of charge. Professional maintenance is also offered.

The numerical values are translated into the following variables:

ValueMeaningAdditional
events
0CERTLOG_MINIMAL
1CERTLOG_TERSE
2CERTLOG_ERROR
3CERTLOG_WARNING(default setting)
4CERTLOG_VERBOSE52 , 68 , 69 , 70 , 71 , 72 , 73 , 76 , 97
5CERTLOG_EXHAUSTIVE

The log level can be changed with the following command:

certutil -setreg CA\Loglevel {LogLevel}

Increasing the logging level can generate a lot of events. Accordingly, it should be ensured that the event log can grow accordingly. Otherwise, earlier events will be overwritten. It is advisable to increase the logging level only temporarily.

Command prompt: certutil -setreg CA\LogLevel 4 changes LogLevel from 3 to 4, "The CertSvc service may need to be restarted for changes to take effect."

Afterwards, the certification authority service must be restarted.

Restart-Service -ServiceName CertSvc

External sources