Clear All Event Logs in Event Viewer in Windows  

Page 8 of 11 FirstFirst ... 678910 ... LastLast

  1. Posts : 204
    Windows 10 Pro
       #70

    That makes sense an come to think of it it did slow down after a Mbam update....thanks for that heads up.
      My Computer


  2. Posts : 6
    Windows 10 Pro 64-bit
       #71

    I got an error with the Powershell script.

    PS C:\WINDOWS\system32> wevtutil el | Foreach-Object {wevtutil cl "$_"} Failed to clear log Microsoft-Windows-USBVideo/Analytic.
    The instance name passed was not recognized as valid by a WMI data provider.
      My Computer


  3. Posts : 287
    windows 10 pro 64
       #72

    hi @Brink
    this should work for Microsoft-Windows-LiveId , to clean the log
    might you please check and confirm ?
    cheers
    @echo off


    net stop NcdAutoSetup


    net stop netprofm


    net stop NlaSvc


    net stop EventLog


    ping 1.1.1.1 -n 1 -w 1500 > nul


    del /f /q /a %windir%\System32\winevt\Logs\*.* > nul


    net start NcdAutoSetup
    net start netprofm
    net start NlaSvc
    net start EventLog


    for /f %%a in ('WEVTUTIL EL') do WEVTUTIL CL "%%a" > nul
      My Computer


  4. Posts : 61,501
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #73

    drugo said:
    hi @Brink
    this should work for Microsoft-Windows-LiveId , to clean the log
    might you please check and confirm ?
    cheers
    Hey mate,

    I'm not sure what you mean for it to work for Microsoft-Windows-LiveId.

    The options in the tutorial work for both a local account and Microsoft account so long as it's an administrator.
      My Computers


  5. Posts : 287
    windows 10 pro 64
       #74

    Brink said:
    Hey mate,

    I'm not sure what you mean for it to work for Microsoft-Windows-LiveId.

    The options in the tutorial work for both a local account and Microsoft account so long as it's an administrator.
    hi
    i tried to clean Microsoft-Windows-LiveId log , but i got always errors with all options in the first page ,option 1 ,2 ,3 and 4
    i tried the bat above as administrator and it worked
    but right now i guess some user posted in the here #39
    have you tested the bat above?
    thanks Brink
      My Computer


  6. Posts : 61,501
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #75

    drugo said:
    hi
    i tried to clean Microsoft-Windows-LiveId log , but i got always errors with all options in the first page ,option 1 ,2 ,3 and 4
    i tried the bat above as administrator and it worked
    but right now i guess some user posted in the here #39
    have you tested the bat above?
    thanks Brink
    I've just tested it, but it failed to clear the Applications and Services logs > Microsoft > Windows > LiveId log for me even with Run as administrator.
      My Computers


  7. Posts : 10
    Windows 10
       #76

    Again, I wanted to delete all files in %windir%\System32\winevt\Logs\*.*
    Naturally, Need firstly should be stopped netprofm & NlaSvc services, then the EventLog service. But sometimes netprofm & NlaSvc services can't stopped. Error: 1061.

    I found a solution: Forced terminate of services. (Caution: Can cause unknown problems.)

    Thanks Rishi in StackOverflow for the Powershell command trick.

    Now, my final CleanEventViewerFiles.bat:

    @echo off
    net stop NcdAutoSetup /Y
    net stop netprofm /Y
    net stop NlaSvc /Y
    net stop EventLog /Y


    powershell -c "$ServicePID = (get-wmiobject win32_service | where { $_.name -eq 'NcdAutoSetup'}).processID; taskkill /f /pid $ServicePID"


    powershell -c "$ServicePID = (get-wmiobject win32_service | where { $_.name -eq 'netprofm'}).processID; taskkill /f /pid $ServicePID"


    powershell -c "$ServicePID = (get-wmiobject win32_service | where { $_.name -eq 'NlaSvc'}).processID; taskkill /f /pid $ServicePID"


    powershell -c "$ServicePID = (get-wmiobject win32_service | where { $_.name -eq 'EventLog'}).processID; taskkill /f /pid $ServicePID"


    ping 1.1.1.1 -n 1 -w 1500 > nul


    del /f /q /a %windir%\System32\winevt\Logs\*.* >nul 2>nul
    del /f /q /a %windir%\System32\WDI\LogFiles\*.* >nul 2>nul


    net start NcdAutoSetup
    net start netprofm
    net start NlaSvc
    net start EventLog

    REM Recreating .EVTX files...
    for /f %%a in ('WEVTUTIL EL') do WEVTUTIL CL "%%a" >nul 2>nul


    pause
    Last edited by pureocean; 22 Jul 2020 at 15:26. Reason: CODE tag replaces QUOTE
      My Computer


  8. Posts : 16
    Windows 10
       #77

    Thank you!


    Really help, the best way to clear and save time!!
      My Computer


  9. Posts : 1,867
    Windows 10 Pro 2004 20H1
       #78

    Brink said:
    I've just tested it, but it failed to clear the Applications and Services logs > Microsoft > Windows > LiveId log for me even with Run as administrator.
    I had to do the following in order to clear LiveId logs -

    Code:
    wevtutil sl Microsoft-Windows-LiveId/Operational /ca:O:BAG:SYD:(A;;0x1;;;SY)(A;;0x5;;;BA)(A;;0x1;;;LA)
    
    wevtutil sl Microsoft-Windows-LiveId/Analytic /ca:O:BAG:SYD:(A;;0x1;;;SY)(A;;0x5;;;BA)(A;;0x1;;;LA)
      My Computer


  10. Posts : 61,501
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #79

    OldNavyGuy said:
    I had to do the following in order to clear LiveId logs -

    Code:
    wevtutil sl Microsoft-Windows-LiveId/Operational /ca:O:BAG:SYD:(A;;0x1;;;SY)(A;;0x5;;;BA)(A;;0x1;;;LA)
    
    wevtutil sl Microsoft-Windows-LiveId/Analytic /ca:O:BAG:SYD:(A;;0x1;;;SY)(A;;0x5;;;BA)(A;;0x1;;;LA)
    Thank you.
      My Computers


 

Tutorial Categories

Clear All Event Logs in Event Viewer in Windows Tutorial Index Network & Sharing Instalation and Upgrade Browsers and Email General Tips Gaming Customization Apps and Features Virtualization BSOD System Security User Accounts Hardware and Drivers Updates and Activation Backup and Restore Performance and Maintenance Mixed Reality Phone


  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 03:53.
Find Us




Windows 10 Forums