Server 2102R2
Are there scripts/tasks to cleanup/delete of log entries? I do it manually but it is very tedious.
Suggestions ,please
Server 2102R2
Are there scripts/tasks to cleanup/delete of log entries? I do it manually but it is very tedious.
Suggestions ,please
From PowerShell you can Clear-EventLog
https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/clear-eventlog?view=powershell-5.1
--please don't forget to upvote and Accept as answer if the reply is helpful--
Not sure what logs you're asking about. You may need to roll your own or take a look here for some examples / ideas.
https://docs.microsoft.com/en-us/samples/browse/
--please don't forget to upvote and Accept as answer if the reply is helpful--
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://docs.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.
Sounds good
--please don't forget to upvote and Accept as answer if the reply is helpful--
Got it to work
first you have to be at PowerShell 5. Server2012R2 is level 4.
Next you execute in elevated window.
Beautiful
Does it work in Windows 10?
Glad to hear, you're welcome. Yes, it will work on windows 10 as well.
--please don't forget to upvote and Accept as answer if the reply is helpful--
10 people are following this question.