'How to create a task scheduler for automatically delete event logs ? Windows 10

On my server every day a large number of event logs are stored on location C:\Windows\System32\winevt\Logs.

Is it possible to create through task scheduler automation that will delete event logs older than 10 days?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source