Quantcast
Channel: TechNet Blogs
Viewing all articles
Browse latest Browse all 36188

Tip of the Day: Windows PowerShell cleans up Events

$
0
0

Today’s Tip…

We, as support staff, are constantly opening customer event logs and this could lead to a situation as following:

image

(Event log names removed for privacy reasons)

In the past you had to right click each entry and click onto remove. Now this can be accomplished by 3 simple steps:

  1. Close event viewer
  2. Run the following powershell commands in an elevated powershell:

$SavedEventlogs=get-childitem 'C:\ProgramData\Microsoft\Event Viewer\ExternalLogs'

ForEach ($eventlog in $Savedeventlogs) {

remove-item $eventlog.FullName}

  1. Start event viewer and all saved logs should be gone.

Viewing all articles
Browse latest Browse all 36188

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>