• Content
  • Comments (0)
  • Related articles
May
28
2011

How to delete Event Log Section using PowerShell Saturday, 28 May 2011

Event Logs are saved under [C:\WINDOWS\system32\config\] as [*.evt] files but are locked by [services.exe]. Therefore can’t be deleted and even if you do so are automatically recreated on next reboot. So if you need to delete one of the Event Log Sections under : [Computer Management > System Tools > Event Viewer] the easy way to do that is Windows PowerShell tool. No reebot is needed after that, just make shure you close and reopen the Computer Management console.
WPS command:
[system.diagnostics.eventlog]::Delete(“EventLogName”)
*EventLogName – that should be exacly as it is under Computer Management > System Tools > Event Viewer

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

Sorry but there are no similar articles at this time.