I am currently working with Windows Server 2022 and I need assistance in adjusting the event log settings. Specifically, I would like to set a retention policy for event logs with a particular log name to be based on a specified number of days, rather than by size. I want the event logs that are older than this defined period to be cleared automatically by Event Viewer.
Is there a way to achieve this within Event Viewer? If there are any alternative methods or approaches to implement a days-based retention policy for event logs, I would greatly appreciate your guidance.
Also, I found the below reference which might be of use regarding this query, so kindly explain how use the method given in the reference if it is related to my query.
https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-gpsb/0b9673a7-ce0a-49b4-912b-591efdb37cdf