I would like to reset all my event logs to default


  1. Posts : 97
    Win10 Pro, Version 21H2 (Build 19044.1706) (14.06.2022)
       #1

    I would like to reset all my event logs to default


    By mistake, I have executed a wrong command (SL /e:false to disable all event logging instead of clearing it. Got it from another website ).

    Now I would like to reset all my event logs to default.
    Has someone an idea, how I could apply the steps from this article:
    Reset an event log to default settings: Management Services (which is for Windows Server only!)
    to my Windows 10 machine?
      My Computers


  2. Posts : 56,825
    Multi-boot Windows 10/11 - RTM, RP, Beta, and Insider
       #2

    WTenNewbie said:
    By mistake, I have executed a wrong command (SL /e:false to disable all event logging instead of clearing it. Got it from another website ).

    Now I would like to reset all my event logs to default.
    Has someone an idea, how I could apply the steps from this article:
    Reset an event log to default settings: Management Services (which is for Windows Server only!)
    to my Windows 10 machine?
    WTenNewbie... what was the exact command you entered, the full command?
      My Computers


  3. Posts : 97
    Win10 Pro, Version 21H2 (Build 19044.1706) (14.06.2022)
    Thread Starter
       #3

    Code:
    for /f "delims=" %%a in ('WEVTUTIL EL') do WEVTUTIL SL "%%a" /e:false
    I get dozens of errors, if I try the same line with ... /e:true
      My Computers


  4. Posts : 14,046
    Windows 11 Pro X64 22H2 22621.1848
       #4

    I use the batch file from Brinks tutorial here: Event Viewer - Clear All Event Logs in Windows - Windows 10 Forums
      My Computers


  5. Posts : 3,502
    Win_8.1-Pro, Win_10.1607-Pro, Mint_17.3
       #5

    WTenNewbie said:
    Code:
    for /f "delims=" %%a in ('WEVTUTIL EL') do WEVTUTIL SL "%%a" /e:false
    Is this command in a batch file or are you entering it in Command Prompt?

    I would expect errors if you try to enter it in Command Prompt

    In a batch file

    for /F "tokens=*" %%a in ('wevtutil.exe el') DO wevtutil.exe cl "%%a"

    Typed in Command Prompt

    for /F "tokens=*" %1 in ('wevtutil.exe el') DO wevtutil.exe cl "%1"

    Note the difference in the percent signs (batch=%% ... typed=%)
    The difference in the variable names 1 and a is irrelevant, they could both be anything else x, y, or z.

    Your example seems to have missed something - the asterisk
    for /f "delims=" %%a
    should be
    for /f "delims=*" %%a

    I'm not sure you actually changed anything - but if you saw things did get changed, then I would just enable everything. Why? Because I don't know the defaults for all of the event listeners ... maybe another member knows.
      My Computer


  6. Posts : 97
    Win10 Pro, Version 21H2 (Build 19044.1706) (14.06.2022)
    Thread Starter
       #6

    A command in a batch file. The main difference is the SL (set-log) instead of CL (clear-log).
    Enable everything is - as mentioned - not possible due to the many errrors.
      My Computers


  7. Posts : 3,502
    Win_8.1-Pro, Win_10.1607-Pro, Mint_17.3
       #7

    WTenNewbie said:
    A command in a batch file. The main difference is the SL (set-log) instead of CL (clear-log).
    Enable everything is - as mentioned - not possible due to the many errors.
    Thanks
    I guess that's what I'm saying then - if Enable everything is impossible due to the errors, then the Disable Everything failed the same way. I can't tell from this side of your monitor.

    You might want to check a few categories to see if they are enabled or disabled
    In event Viewer,
    Right-click the log (operational),
    Select Properties
    If Enable Logging is checked, then the disable that you ran did not take effect due to the errors.
    I would like to reset all my event logs to default-evtlogenabled.png

    Good eyes - I missed that subtle but important distinction

    Did try it with the correct selection criteria?

    "delims=*"

    If you still get errors, please post a screen shot or copy the output from the Command Prompt window
    - thanks
      My Computer


 

  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 08:38.
Find Us




Windows 10 Forums