Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
13,236 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi Experts,
Windows server run out of space on C drive due to GPO that doesn't delete old event logs.
Could someone please let me know how to delete old event logs via GPO
I am looking forward to hearing from you
Regards
Leo
Hello Jimmy Afflick
You could do that with PowerShell:
#Clear Specific Log
Clear-EventLog -LogName LogName
#Clean All Logs
Get-EventLog -LogName * | ForEach {Clear-EventLog $_.Log}
Deleting old Windows event logs can be beneficial in certain situations, but it also has potential downsides, such as the loss of historical data, issues with security audits, and hindering troubleshooting efforts.
Kind regards
Dom