Which type of logs do you want to clear? Event log, IIS log or WSUS log? We need more detailed information to assist you with demand.
In general, if you want to an event log cleanup script, please refer to this Microsoft document
Clear-EventLog
https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/clear-eventlog?view=powershell-5.1
If you want to cleaup IIS log, refer to this article:
How to: Cleanup IIS Log Files
https://community.spiceworks.com/how_to/85462-cleanup-iis-log-files
-------------------------------------------------------------------------------------
If the Answer is helpful, please click "Accept Answer" and upvote it.
Information posted in the given link is hosted by a third party. Microsoft does not guarantee the accuracy and effectiveness of information.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.