none
Is there another way to clear all events in the event logs with or without saving? RRS feed

  • Question

  • I haven't been able to find a way to clear all event logs without saving. In Win 7 and vista (I only tested this in win 7) I like to occassionaly clear the administrator alerts without having to go in to each event log area to do so. Sometimes I just want to wipe the all clean do a reboot and see what happens. There doesn't seem an easy way to clear out everything, so I wrote a simple batch file that does this. If there is another way, please let me know. It's a real simple script, just time consuming to write it. I used a lot of copy/paste and a macro utility to insert the wevtutil command.

    For more info on wevtutil, open a cmd prompt and type wevtutil /?
    You can edit this script to save each event log too if you need to. Good luck editing each line though...

    Otherwise, maybe others will find this useful. Simply copy and paste the text below in to a batch file (text file with extension bat) then right click and run as administrator to clean out all events in all event logs...

    REM - Will clear all event logs in Windows 7 Ultimate without prompting or saving.
    REM - Created by Leonard Rivera
    wevtutil.exe cl Analytic
    wevtutil.exe cl Application
    wevtutil.exe cl DirectShowFilterGraph
    wevtutil.exe cl DirectShowPluginControl
    wevtutil.exe cl EndpointMapper
    wevtutil.exe cl ForwardedEvents
    wevtutil.exe cl HardwareEvents
    wevtutil.exe cl Internet Explorer
    wevtutil.exe cl Key Management Service
    wevtutil.exe cl MF_MediaFoundationDeviceProxy
    wevtutil.exe cl "Media Center"
    wevtutil.exe cl MediaFoundationDeviceProxy
    wevtutil.exe cl MediaFoundationPerformance
    wevtutil.exe cl MediaFoundationPipeline
    wevtutil.exe cl MediaFoundationPlatform
    wevtutil.exe cl Microsoft-IE/Diagnostic
    wevtutil.exe cl Microsoft-IEFRAME/Diagnostic
    wevtutil.exe cl Microsoft-PerfTrack-IEFRAME/Diagnostic
    wevtutil.exe cl Microsoft-PerfTrack-MSHTML/Diagnostic
    wevtutil.exe cl Microsoft-Windows-ADSI/Debug
    wevtutil.exe cl Microsoft-Windows-API-Tracing/Operational
    wevtutil.exe cl Microsoft-Windows-ATAPort/General
    wevtutil.exe cl Microsoft-Windows-ATAPort/SATA-LPM
    wevtutil.exe cl Microsoft-Windows-ActionQueue/Analytic
    wevtutil.exe cl Microsoft-Windows-AltTab/Diagnostic
    wevtutil.exe cl Microsoft-Windows-AppID/Operational
    wevtutil.exe cl Microsoft-Windows-AppLocker/EXE and DLL
    wevtutil.exe cl Microsoft-Windows-AppLocker/MSI and Script
    wevtutil.exe cl Microsoft-Windows-Application-Experience/Problem-Steps-Recorder
    wevtutil.exe cl Microsoft-Windows-Application-Experience/Program-Compatibility-Assistant
    wevtutil.exe cl Microsoft-Windows-Application-Experience/Program-Compatibility-Troubleshooter
    wevtutil.exe cl Microsoft-Windows-Application-Experience/Program-Inventory
    wevtutil.exe cl Microsoft-Windows-Application-Experience/Program-Inventory/Debug
    wevtutil.exe cl Microsoft-Windows-Application-Experience/Program-Telemetry
    wevtutil.exe cl Microsoft-Windows-Audio/CaptureMonitor
    wevtutil.exe cl Microsoft-Windows-Audio/Operational
    wevtutil.exe cl Microsoft-Windows-Audio/Performance
    wevtutil.exe cl Microsoft-Windows-Audit/Analytic
    wevtutil.exe cl "Microsoft-Windows-Authentication User Interface/Operational"
    wevtutil.exe cl Microsoft-Windows-AxInstallService/Log
    wevtutil.exe cl Microsoft-Windows-Backup
    wevtutil.exe cl Microsoft-Windows-Biometrics/Operational
    wevtutil.exe cl Microsoft-Windows-BitLocker-DrivePreparationTool/Admin
    wevtutil.exe cl Microsoft-Windows-BitLocker-DrivePreparationTool/Operational
    wevtutil.exe cl Microsoft-Windows-Bits-Client/Analytic
    wevtutil.exe cl Microsoft-Windows-Bits-Client/Operational
    wevtutil.exe cl Microsoft-Windows-Bluetooth-MTPEnum/Operational
    wevtutil.exe cl Microsoft-Windows-BranchCache/Operational
    wevtutil.exe cl Microsoft-Windows-BranchCacheClientEventProvider/Diagnostic
    wevtutil.exe cl Microsoft-Windows-BranchCacheEventProvider/Diagnostic
    wevtutil.exe cl Microsoft-Windows-BranchCacheSMB/Analytic
    wevtutil.exe cl Microsoft-Windows-BranchCacheSMB/Operational
    wevtutil.exe cl Microsoft-Windows-CAPI2/Operational
    wevtutil.exe cl Microsoft-Windows-CDROM/Operational
    wevtutil.exe cl Microsoft-Windows-COM/Analytic
    wevtutil.exe cl Microsoft-Windows-COMRuntime/Tracing
    wevtutil.exe cl Microsoft-Windows-Calculator/Debug
    wevtutil.exe cl Microsoft-Windows-Calculator/Diagnostic
    wevtutil.exe cl Microsoft-Windows-CertPoleEng/Operational
    wevtutil.exe cl Microsoft-Windows-CertificateServicesClient-CredentialRoaming/Operational
    wevtutil.exe cl Microsoft-Windows-ClearTypeTextTuner/Diagnostic
    wevtutil.exe cl Microsoft-Windows-CmiSetup/Analytic
    wevtutil.exe cl Microsoft-Windows-CodeIntegrity/Operational
    wevtutil.exe cl Microsoft-Windows-CodeIntegrity/Verbose
    wevtutil.exe cl Microsoft-Windows-ComDlg32/Analytic
    wevtutil.exe cl Microsoft-Windows-ComDlg32/Debug
    wevtutil.exe cl Microsoft-Windows-CorruptedFileRecovery-Client/Operational
    wevtutil.exe cl Microsoft-Windows-CorruptedFileRecovery-Server/Operational
    wevtutil.exe cl Microsoft-Windows-CredUI/Diagnostic
    wevtutil.exe cl Microsoft-Windows-Crypto-RNG/Analytic
    wevtutil.exe cl Microsoft-Windows-DCLocator/Debug
    wevtutil.exe cl Microsoft-Windows-DNS-Client/Operational
    wevtutil.exe cl Microsoft-Windows-DUI/Diagnostic
    wevtutil.exe cl Microsoft-Windows-DUSER/Diagnostic
    wevtutil.exe cl Microsoft-Windows-DXP/Analytic
    wevtutil.exe cl Microsoft-Windows-DateTimeControlPanel/Analytic
    wevtutil.exe cl Microsoft-Windows-DateTimeControlPanel/Debug
    wevtutil.exe cl Microsoft-Windows-DateTimeControlPanel/Operational
    wevtutil.exe cl Microsoft-Windows-Deplorch/Analytic
    wevtutil.exe cl Microsoft-Windows-DeviceSync/Analytic
    wevtutil.exe cl Microsoft-Windows-DeviceSync/Operational
    wevtutil.exe cl Microsoft-Windows-DeviceUx/Informational
    wevtutil.exe cl Microsoft-Windows-DeviceUx/Performance
    wevtutil.exe cl Microsoft-Windows-Dhcp-Client/Admin
    wevtutil.exe cl Microsoft-Windows-Dhcp-Client/Operational
    wevtutil.exe cl Microsoft-Windows-DhcpNap/Admin
    wevtutil.exe cl Microsoft-Windows-DhcpNap/Operational
    wevtutil.exe cl Microsoft-Windows-Dhcpv6-Client/Admin
    wevtutil.exe cl Microsoft-Windows-Dhcpv6-Client/Operational
    wevtutil.exe cl Microsoft-Windows-DiagCpl/Debug
    wevtutil.exe cl Microsoft-Windows-Diagnosis-DPS/Analytic
    wevtutil.exe cl Microsoft-Windows-Diagnosis-DPS/Debug
    wevtutil.exe cl Microsoft-Windows-Diagnosis-DPS/Operational
    wevtutil.exe cl Microsoft-Windows-Diagnosis-MSDE/Debug
    wevtutil.exe cl Microsoft-Windows-Diagnosis-PCW/Analytic
    wevtutil.exe cl Microsoft-Windows-Diagnosis-PCW/Debug
    wevtutil.exe cl Microsoft-Windows-Diagnosis-PCW/Operational
    wevtutil.exe cl Microsoft-Windows-Diagnosis-PLA/Debug
    wevtutil.exe cl Microsoft-Windows-Diagnosis-PLA/Operational
    wevtutil.exe cl Microsoft-Windows-Diagnosis-Perfhost/Analytic
    wevtutil.exe cl Microsoft-Windows-Diagnosis-Scheduled/Operational
    wevtutil.exe cl Microsoft-Windows-Diagnosis-Scripted/Admin
    wevtutil.exe cl Microsoft-Windows-Diagnosis-Scripted/Analytic
    wevtutil.exe cl Microsoft-Windows-Diagnosis-Scripted/Debug
    wevtutil.exe cl Microsoft-Windows-Diagnosis-Scripted/Operational
    wevtutil.exe cl Microsoft-Windows-Diagnosis-ScriptedDiagnosticsProvider/Debug
    wevtutil.exe cl Microsoft-Windows-Diagnosis-ScriptedDiagnosticsProvider/Operational
    wevtutil.exe cl Microsoft-Windows-Diagnosis-TaskManager/Debug
    wevtutil.exe cl Microsoft-Windows-Diagnosis-WDC/Analytic
    wevtutil.exe cl Microsoft-Windows-Diagnosis-WDI/Debug
    wevtutil.exe cl Microsoft-Windows-Diagnostics-Networking/Debug
    wevtutil.exe cl Microsoft-Windows-Diagnostics-Networking/Operational
    wevtutil.exe cl Microsoft-Windows-Diagnostics-PerfTrack-Counters/Diagnostic
    wevtutil.exe cl Microsoft-Windows-Diagnostics-PerfTrack/Diagnostic
    wevtutil.exe cl Microsoft-Windows-Diagnostics-Performance/Diagnostic
    wevtutil.exe cl Microsoft-Windows-Diagnostics-Performance/Diagnostic/Loopback
    wevtutil.exe cl Microsoft-Windows-Diagnostics-Performance/Operational
    wevtutil.exe cl Microsoft-Windows-DirectShow-KernelSupport/Performance
    wevtutil.exe cl Microsoft-Windows-DirectSound/Debug
    wevtutil.exe cl Microsoft-Windows-DirectWrite-FontCache/Tracing
    wevtutil.exe cl Microsoft-Windows-Disk/Operational
    wevtutil.exe cl Microsoft-Windows-DiskDiagnostic/Operational
    wevtutil.exe cl Microsoft-Windows-DiskDiagnosticDataCollector/Operational
    wevtutil.exe cl Microsoft-Windows-DiskDiagnosticResolver/Operational
    wevtutil.exe cl Microsoft-Windows-DisplayColorCalibration/Debug
    wevtutil.exe cl Microsoft-Windows-DisplayColorCalibration/Operational
    wevtutil.exe cl Microsoft-Windows-DisplaySwitch/Diagnostic
    wevtutil.exe cl Microsoft-Windows-Documents/Performance
    wevtutil.exe cl Microsoft-Windows-DriverFrameworks-UserMode/Operational
    wevtutil.exe cl Microsoft-Windows-DxgKrnl/Diagnostic
    wevtutil.exe cl Microsoft-Windows-DxgKrnl/Performance
    wevtutil.exe cl Microsoft-Windows-DxpTaskRingtone/Analytic
    wevtutil.exe cl Microsoft-Windows-DxpTaskSyncProvider/Analytic
    wevtutil.exe cl Microsoft-Windows-EFS/Debug
    wevtutil.exe cl Microsoft-Windows-EapHost/Analytic
    wevtutil.exe cl Microsoft-Windows-EapHost/Debug
    wevtutil.exe cl Microsoft-Windows-EapHost/Operational
    wevtutil.exe cl Microsoft-Windows-EaseOfAccess/Diagnostic
    wevtutil.exe cl Microsoft-Windows-EventCollector/Debug
    wevtutil.exe cl Microsoft-Windows-EventCollector/Operational
    wevtutil.exe cl Microsoft-Windows-EventLog-WMIProvider/Debug
    wevtutil.exe cl Microsoft-Windows-EventLog/Analytic
    wevtutil.exe cl Microsoft-Windows-EventLog/Debug
    wevtutil.exe cl Microsoft-Windows-FMS/Analytic
    wevtutil.exe cl Microsoft-Windows-FMS/Debug
    wevtutil.exe cl Microsoft-Windows-FMS/Operational
    wevtutil.exe cl Microsoft-Windows-FailoverClustering-Client/Diagnostic
    wevtutil.exe cl Microsoft-Windows-Fault-Tolerant-Heap/Operational
    wevtutil.exe cl Microsoft-Windows-Feedback-Service-TriggerProvider
    wevtutil.exe cl Microsoft-Windows-FileInfoMinifilter/Operational
    wevtutil.exe cl Microsoft-Windows-Firewall-CPL/Diagnostic
    wevtutil.exe cl "Microsoft-Windows-Folder Redirection/Operational"
    wevtutil.exe cl Microsoft-Windows-Forwarding/Debug
    wevtutil.exe cl Microsoft-Windows-Forwarding/Operational
    wevtutil.exe cl Microsoft-Windows-GettingStarted/Diagnostic
    wevtutil.exe cl Microsoft-Windows-GroupPolicy/Operational
    wevtutil.exe cl Microsoft-Windows-HAL/Debug
    wevtutil.exe cl Microsoft-Windows-HealthCenter/Debug
    wevtutil.exe cl Microsoft-Windows-HealthCenter/Performance
    wevtutil.exe cl Microsoft-Windows-HealthCenterCPL/Performance
    wevtutil.exe cl Microsoft-Windows-Help/Operational
    wevtutil.exe cl "Microsoft-Windows-HomeGroup Control Panel Performance/Diagnostic"
    wevtutil.exe cl "Microsoft-Windows-HomeGroup Control Panel/Operational"
    wevtutil.exe cl "Microsoft-Windows-HomeGroup Listener Service/Operational"
    wevtutil.exe cl "Microsoft-Windows-HomeGroup Provider Service Performance/Diagnostic"
    wevtutil.exe cl "Microsoft-Windows-HomeGroup Provider Service/Operational"
    wevtutil.exe cl Microsoft-Windows-HomeGroup-ListenerService
    wevtutil.exe cl Microsoft-Windows-HotStart/Diagnostic
    wevtutil.exe cl Microsoft-Windows-HttpService/Trace
    wevtutil.exe cl Microsoft-Windows-IKE/Operational
    wevtutil.exe cl Microsoft-Windows-IKEDBG/Debug
    wevtutil.exe cl Microsoft-Windows-IPBusEnum/Tracing
    wevtutil.exe cl Microsoft-Windows-IPSEC-SRV/Diagnostic
    wevtutil.exe cl Microsoft-Windows-International-RegionalOptionsControlPanel/Operational
    wevtutil.exe cl Microsoft-Windows-International/Operational
    wevtutil.exe cl Microsoft-Windows-Iphlpsvc/Debug
    wevtutil.exe cl Microsoft-Windows-Iphlpsvc/Operational
    wevtutil.exe cl Microsoft-Windows-Iphlpsvc/Trace
    wevtutil.exe cl Microsoft-Windows-Kernel-Acpi/Diagnostic
    wevtutil.exe cl Microsoft-Windows-Kernel-Boot/Analytic
    wevtutil.exe cl Microsoft-Windows-Kernel-BootDiagnostics/Diagnostic
    wevtutil.exe cl Microsoft-Windows-Kernel-Disk/Analytic
    wevtutil.exe cl Microsoft-Windows-Kernel-EventTracing/Admin
    wevtutil.exe cl Microsoft-Windows-Kernel-EventTracing/Analytic
    wevtutil.exe cl Microsoft-Windows-Kernel-File/Analytic
    wevtutil.exe cl Microsoft-Windows-Kernel-Memory/Analytic
    wevtutil.exe cl Microsoft-Windows-Kernel-Network/Analytic
    wevtutil.exe cl Microsoft-Windows-Kernel-PnP/Diagnostic
    wevtutil.exe cl Microsoft-Windows-Kernel-Power/Diagnostic
    wevtutil.exe cl Microsoft-Windows-Kernel-Power/Thermal-Diagnostic
    wevtutil.exe cl Microsoft-Windows-Kernel-Power/Thermal-Operational
    wevtutil.exe cl Microsoft-Windows-Kernel-Prefetch/Diagnostic
    wevtutil.exe cl Microsoft-Windows-Kernel-Process/Analytic
    wevtutil.exe cl Microsoft-Windows-Kernel-Processor-Power/Diagnostic
    wevtutil.exe cl Microsoft-Windows-Kernel-Registry/Analytic
    wevtutil.exe cl Microsoft-Windows-Kernel-StoreMgr/Analytic
    wevtutil.exe cl Microsoft-Windows-Kernel-StoreMgr/Operational
    wevtutil.exe cl Microsoft-Windows-Kernel-WDI/Analytic
    wevtutil.exe cl Microsoft-Windows-Kernel-WDI/Debug
    wevtutil.exe cl Microsoft-Windows-Kernel-WDI/Operational
    wevtutil.exe cl Microsoft-Windows-Kernel-WHEA/Errors
    wevtutil.exe cl Microsoft-Windows-Kernel-WHEA/Operational
    wevtutil.exe cl Microsoft-Windows-Known Folders API Service
    wevtutil.exe cl Microsoft-Windows-Known Folders/Operational
    wevtutil.exe cl Microsoft-Windows-L2NA/Diagnostic
    wevtutil.exe cl Microsoft-Windows-LDAP-Client/Debug
    wevtutil.exe cl Microsoft-Windows-LUA-ConsentUI/Diagnostic
    wevtutil.exe cl Microsoft-Windows-LanguagePackSetup/Analytic
    wevtutil.exe cl Microsoft-Windows-LanguagePackSetup/Debug
    wevtutil.exe cl Microsoft-Windows-LanguagePackSetup/Operational
    wevtutil.exe cl Microsoft-Windows-MCT/Operational
    wevtutil.exe cl Microsoft-Windows-MPS-CLNT/Diagnostic
    wevtutil.exe cl Microsoft-Windows-MPS-DRV/Diagnostic
    wevtutil.exe cl Microsoft-Windows-MPS-SRV/Diagnostic
    wevtutil.exe cl Microsoft-Windows-MSPaint/Admin
    wevtutil.exe cl Microsoft-Windows-MSPaint/Debug
    wevtutil.exe cl Microsoft-Windows-MSPaint/Diagnostic
    wevtutil.exe cl Microsoft-Windows-MUI/Admin
    wevtutil.exe cl Microsoft-Windows-MUI/Analytic
    wevtutil.exe cl Microsoft-Windows-MUI/Debug
    wevtutil.exe cl Microsoft-Windows-MUI/Operational
    wevtutil.exe cl Microsoft-Windows-MediaFoundation-MFReadWrite/SinkWriter
    wevtutil.exe cl Microsoft-Windows-MediaFoundation-MFReadWrite/SourceReader
    wevtutil.exe cl Microsoft-Windows-MediaFoundation-MFReadWrite/Transform
    wevtutil.exe cl Microsoft-Windows-MediaFoundation-PlayAPI/Analytic
    wevtutil.exe cl Microsoft-Windows-MemoryDiagnostics-Results/Debug
    wevtutil.exe cl Microsoft-Windows-MobilityCenter/Performance
    wevtutil.exe cl Microsoft-Windows-NCSI/Analytic
    wevtutil.exe cl Microsoft-Windows-NCSI/Operational
    wevtutil.exe cl Microsoft-Windows-NDF-HelperClassDiscovery/Debug
    wevtutil.exe cl Microsoft-Windows-NDIS-PacketCapture/Diagnostic
    wevtutil.exe cl Microsoft-Windows-NDIS/Diagnostic
    wevtutil.exe cl Microsoft-Windows-NDIS/Operational
    wevtutil.exe cl Microsoft-Windows-NTLM/Operational
    wevtutil.exe cl Microsoft-Windows-NWiFi/Diagnostic
    wevtutil.exe cl Microsoft-Windows-Narrator/Diagnostic
    wevtutil.exe cl Microsoft-Windows-NetShell/Performance
    wevtutil.exe cl Microsoft-Windows-Network-and-Sharing-Center/Diagnostic
    wevtutil.exe cl Microsoft-Windows-NetworkAccessProtection/Operational
    wevtutil.exe cl Microsoft-Windows-NetworkAccessProtection/WHC
    wevtutil.exe cl Microsoft-Windows-NetworkLocationWizard/Operational
    wevtutil.exe cl Microsoft-Windows-NetworkProfile/Diagnostic
    wevtutil.exe cl Microsoft-Windows-NetworkProfile/Operational
    wevtutil.exe cl Microsoft-Windows-Networking-Correlation/Diagnostic
    wevtutil.exe cl Microsoft-Windows-NlaSvc/Diagnostic
    wevtutil.exe cl Microsoft-Windows-NlaSvc/Operational
    wevtutil.exe cl Microsoft-Windows-OLEACC/Debug
    wevtutil.exe cl Microsoft-Windows-OLEACC/Diagnostic
    wevtutil.exe cl Microsoft-Windows-OOBE-Machine/Diagnostic
    wevtutil.exe cl Microsoft-Windows-OfflineFiles/Analytic
    wevtutil.exe cl Microsoft-Windows-OfflineFiles/Debug
    wevtutil.exe cl Microsoft-Windows-OfflineFiles/Operational
    wevtutil.exe cl Microsoft-Windows-OfflineFiles/SyncLog
    wevtutil.exe cl Microsoft-Windows-OneX/Diagnostic
    wevtutil.exe cl Microsoft-Windows-OobeLdr/Analytic
    wevtutil.exe cl Microsoft-Windows-PCI/Diagnostic
    wevtutil.exe cl Microsoft-Windows-ParentalControls/Operational
    wevtutil.exe cl Microsoft-Windows-PeerToPeerDrtEventProvider/Diagnostic
    wevtutil.exe cl Microsoft-Windows-PeopleNearMe/Operational
    wevtutil.exe cl Microsoft-Windows-PortableDeviceStatusProvider/Analytic
    wevtutil.exe cl Microsoft-Windows-PortableDeviceSyncProvider/Analytic
    wevtutil.exe cl Microsoft-Windows-PowerCfg/Diagnostic
    wevtutil.exe cl Microsoft-Windows-PowerCpl/Diagnostic
    wevtutil.exe cl Microsoft-Windows-PowerEfficiencyDiagnostics/Diagnostic
    wevtutil.exe cl Microsoft-Windows-PowerShell/Analytic
    wevtutil.exe cl Microsoft-Windows-PowerShell/Operational
    wevtutil.exe cl Microsoft-Windows-PrimaryNetworkIcon/Performance
    wevtutil.exe cl Microsoft-Windows-PrintService/Admin
    wevtutil.exe cl Microsoft-Windows-PrintService/Debug
    wevtutil.exe cl Microsoft-Windows-PrintService/Operational
    wevtutil.exe cl Microsoft-Windows-Program-Compatibility-Assistant/Debug
    wevtutil.exe cl Microsoft-Windows-QoS-Pacer/Diagnostic
    wevtutil.exe cl Microsoft-Windows-QoS-qWAVE/Debug
    wevtutil.exe cl Microsoft-Windows-RPC/Debug
    wevtutil.exe cl Microsoft-Windows-RPC/EEInfo
    wevtutil.exe cl Microsoft-Windows-ReadyBoost/Analytic
    wevtutil.exe cl Microsoft-Windows-ReadyBoost/Operational
    wevtutil.exe cl Microsoft-Windows-ReadyBoostDriver/Analytic
    wevtutil.exe cl Microsoft-Windows-ReadyBoostDriver/Operational
    wevtutil.exe cl Microsoft-Windows-Recovery/Operational
    wevtutil.exe cl Microsoft-Windows-ReliabilityAnalysisComponent/Operational
    wevtutil.exe cl Microsoft-Windows-RemoteApp and Desktop Connections/Admin
    wevtutil.exe cl Microsoft-Windows-RemoteAssistance/Admin
    wevtutil.exe cl Microsoft-Windows-RemoteAssistance/Operational
    wevtutil.exe cl Microsoft-Windows-RemoteAssistance/Tracing
    wevtutil.exe cl Microsoft-Windows-Remotefs-UTProvider/Diagnostic
    wevtutil.exe cl Microsoft-Windows-Resource-Exhaustion-Detector/Operational
    wevtutil.exe cl Microsoft-Windows-Resource-Exhaustion-Resolver/Operational
    wevtutil.exe cl Microsoft-Windows-Resource-Leak-Diagnostic/Operational
    wevtutil.exe cl Microsoft-Windows-ResourcePublication/Tracing
    wevtutil.exe cl Microsoft-Windows-RestartManager/Operational
    wevtutil.exe cl Microsoft-Windows-Search-Core/Diagnostic
    wevtutil.exe cl Microsoft-Windows-Search-ProtocolHandlers/Diagnostic
    wevtutil.exe cl Microsoft-Windows-Security-Audit-Configuration-Client/Diagnostic
    wevtutil.exe cl Microsoft-Windows-Security-Audit-Configuration-Client/Operational
    wevtutil.exe cl Microsoft-Windows-Security-IdentityListener/Operational
    wevtutil.exe cl Microsoft-Windows-Security-SPP/Perf
    wevtutil.exe cl Microsoft-Windows-Sens/Debug
    wevtutil.exe cl Microsoft-Windows-ServiceReportingApi/Debug
    wevtutil.exe cl Microsoft-Windows-Services-Svchost/Diagnostic
    wevtutil.exe cl Microsoft-Windows-Services/Diagnostic
    wevtutil.exe cl Microsoft-Windows-Setup/Analytic
    wevtutil.exe cl Microsoft-Windows-SetupCl/Analytic
    wevtutil.exe cl Microsoft-Windows-SetupQueue/Analytic
    wevtutil.exe cl Microsoft-Windows-SetupUGC/Analytic
    wevtutil.exe cl Microsoft-Windows-ShareMedia-ControlPanel/Diagnostic
    wevtutil.exe cl Microsoft-Windows-Shell-AuthUI-BootAnim/Diagnostic
    wevtutil.exe cl Microsoft-Windows-Shell-AuthUI-Common/Diagnostic
    wevtutil.exe cl Microsoft-Windows-Shell-AuthUI-CredUI/Diagnostic
    wevtutil.exe cl Microsoft-Windows-Shell-AuthUI-Logon/Diagnostic
    wevtutil.exe cl Microsoft-Windows-Shell-AuthUI-PasswordProvider/Diagnostic
    wevtutil.exe cl Microsoft-Windows-Shell-AuthUI-Shutdown/Diagnostic
    wevtutil.exe cl Microsoft-Windows-Shell-Core/Diagnostic
    wevtutil.exe cl Microsoft-Windows-Shell-DefaultPrograms/Diagnostic
    wevtutil.exe cl Microsoft-Windows-Shell-Shwebsvc
    wevtutil.exe cl Microsoft-Windows-Shell-ZipFolder/Diagnostic
    wevtutil.exe cl Microsoft-Windows-Shsvcs/Diagnostic
    wevtutil.exe cl Microsoft-Windows-Sidebar/Diagnostic
    wevtutil.exe cl Microsoft-Windows-Speech-UserExperience/Diagnostic
    wevtutil.exe cl Microsoft-Windows-StickyNotes/Admin
    wevtutil.exe cl Microsoft-Windows-StickyNotes/Debug
    wevtutil.exe cl Microsoft-Windows-StickyNotes/Diagnostic
    wevtutil.exe cl Microsoft-Windows-StorDiag/Operational
    wevtutil.exe cl Microsoft-Windows-StorPort/Operational
    wevtutil.exe cl Microsoft-Windows-Subsys-Csr/Operational
    wevtutil.exe cl Microsoft-Windows-Subsys-SMSS/Operational
    wevtutil.exe cl Microsoft-Windows-Superfetch/Main
    wevtutil.exe cl Microsoft-Windows-Superfetch/StoreLog
    wevtutil.exe cl Microsoft-Windows-Sysprep/Analytic
    wevtutil.exe cl Microsoft-Windows-SystemHealthAgent/Diagnostic
    wevtutil.exe cl Microsoft-Windows-TCPIP/Diagnostic
    wevtutil.exe cl Microsoft-Windows-TSF-msctf/Debug
    wevtutil.exe cl Microsoft-Windows-TSF-msctf/Diagnostic
    wevtutil.exe cl Microsoft-Windows-TSF-msutb/Debug
    wevtutil.exe cl Microsoft-Windows-TSF-msutb/Diagnostic
    wevtutil.exe cl Microsoft-Windows-TZUtil/Operational
    wevtutil.exe cl Microsoft-Windows-TaskScheduler/Debug
    wevtutil.exe cl Microsoft-Windows-TaskScheduler/Diagnostic
    wevtutil.exe cl Microsoft-Windows-TaskScheduler/Operational
    wevtutil.exe cl Microsoft-Windows-TaskbarCPL/Diagnostic
    wevtutil.exe cl Microsoft-Windows-TerminalServices-LocalSessionManager/Admin
    wevtutil.exe cl Microsoft-Windows-TerminalServices-LocalSessionManager/Analytic
    wevtutil.exe cl Microsoft-Windows-TerminalServices-LocalSessionManager/Debug
    wevtutil.exe cl Microsoft-Windows-TerminalServices-LocalSessionManager/Operational
    wevtutil.exe cl Microsoft-Windows-TerminalServices-MediaRedirection/Analytic
    wevtutil.exe cl Microsoft-Windows-TerminalServices-PnPDevices/Admin
    wevtutil.exe cl Microsoft-Windows-TerminalServices-PnPDevices/Analytic
    wevtutil.exe cl Microsoft-Windows-TerminalServices-PnPDevices/Debug
    wevtutil.exe cl Microsoft-Windows-TerminalServices-PnPDevices/Operational
    wevtutil.exe cl Microsoft-Windows-TerminalServices-RDPClient/Analytic
    wevtutil.exe cl Microsoft-Windows-TerminalServices-RDPClient/Debug
    wevtutil.exe cl Microsoft-Windows-TerminalServices-RDPClient/Operational
    wevtutil.exe cl Microsoft-Windows-TerminalServices-RdpSoundDriver/Capture
    wevtutil.exe cl Microsoft-Windows-TerminalServices-RdpSoundDriver/Playback
    wevtutil.exe cl Microsoft-Windows-TerminalServices-RemoteConnectionManager/Admin
    wevtutil.exe cl Microsoft-Windows-TerminalServices-RemoteConnectionManager/Analytic
    wevtutil.exe cl Microsoft-Windows-TerminalServices-RemoteConnectionManager/Debug
    wevtutil.exe cl Microsoft-Windows-TerminalServices-RemoteConnectionManager/Operational
    wevtutil.exe cl Microsoft-Windows-ThemeCPL/Diagnostic
    wevtutil.exe cl Microsoft-Windows-ThemeUI/Diagnostic
    wevtutil.exe cl Microsoft-Windows-TunnelDriver
    wevtutil.exe cl Microsoft-Windows-UAC-FileVirtualization/Operational
    wevtutil.exe cl Microsoft-Windows-UAC/Operational
    wevtutil.exe cl Microsoft-Windows-UIAnimation/Diagnostic
    wevtutil.exe cl Microsoft-Windows-UIAutomationCore/Debug
    wevtutil.exe cl Microsoft-Windows-UIAutomationCore/Diagnostic
    wevtutil.exe cl Microsoft-Windows-UIAutomationCore/Perf
    wevtutil.exe cl Microsoft-Windows-UIRibbon/Diagnostic
    wevtutil.exe cl Microsoft-Windows-USB-USBHUB/Diagnostic
    wevtutil.exe cl Microsoft-Windows-USB-USBPORT/Diagnostic
    wevtutil.exe cl "Microsoft-Windows-User Control Panel Performance/Diagnostic"
    wevtutil.exe cl "Microsoft-Windows-User Profile Service/Diagnostic"
    wevtutil.exe cl "Microsoft-Windows-User Profile Service/Operational"
    wevtutil.exe cl Microsoft-Windows-User-Loader/Analytic
    wevtutil.exe cl Microsoft-Windows-UserModePowerService/Diagnostic
    wevtutil.exe cl Microsoft-Windows-UserPnp/DeviceMetadata/Debug
    wevtutil.exe cl Microsoft-Windows-UserPnp/DeviceNotifications
    wevtutil.exe cl Microsoft-Windows-UserPnp/Performance
    wevtutil.exe cl Microsoft-Windows-UserPnp/SchedulerOperations
    wevtutil.exe cl Microsoft-Windows-UxTheme/Diagnostic
    wevtutil.exe cl Microsoft-Windows-VAN/Diagnostic
    wevtutil.exe cl Microsoft-Windows-VDRVROOT/Operational
    wevtutil.exe cl Microsoft-Windows-VHDMP/Operational
    wevtutil.exe cl Microsoft-Windows-VWiFi/Diagnostic
    wevtutil.exe cl "Microsoft-Windows-Virtual PC/Admin"
    wevtutil.exe cl Microsoft-Windows-VolumeControl/Performance
    wevtutil.exe cl Microsoft-Windows-VolumeSnapshot-Driver/Operational
    wevtutil.exe cl Microsoft-Windows-WABSyncProvider/Analytic
    wevtutil.exe cl Microsoft-Windows-WCN-Config-Registrar/Diagnostic
    wevtutil.exe cl Microsoft-Windows-WER-Diag/Operational
    wevtutil.exe cl Microsoft-Windows-WFP/Analytic
    wevtutil.exe cl Microsoft-Windows-WFP/Operational
    wevtutil.exe cl Microsoft-Windows-WLAN-AutoConfig/Operational
    wevtutil.exe cl Microsoft-Windows-WLAN-Autoconfig/Diagnostic
    wevtutil.exe cl Microsoft-Windows-WLANConnectionFlow/Diagnostic
    wevtutil.exe cl Microsoft-Windows-WMI-Activity/Trace
    wevtutil.exe cl Microsoft-Windows-WMPDMCCore/Diagnostic
    wevtutil.exe cl Microsoft-Windows-WMPDMCUI/Diagnostic
    wevtutil.exe cl Microsoft-Windows-WMPNSS-PublicAPI/Diagnostic
    wevtutil.exe cl Microsoft-Windows-WMPNSS-Service/Diagnostic
    wevtutil.exe cl Microsoft-Windows-WMPNSSUI/Diagnostic
    wevtutil.exe cl Microsoft-Windows-WPD-ClassInstaller/Analytic
    wevtutil.exe cl Microsoft-Windows-WPD-ClassInstaller/Operational
    wevtutil.exe cl Microsoft-Windows-WPD-CompositeClassDriver/Analytic
    wevtutil.exe cl Microsoft-Windows-WPD-CompositeClassDriver/Operational
    wevtutil.exe cl Microsoft-Windows-WPD-MTPClassDriver/Operational
    wevtutil.exe cl Microsoft-Windows-WSC-SRV/Diagnostic
    wevtutil.exe cl Microsoft-Windows-WUSA/Debug
    wevtutil.exe cl Microsoft-Windows-WWAN-MM-Events/Diagnostic
    wevtutil.exe cl Microsoft-Windows-WWAN-NDISUIO-EVENTS/Diagnostic
    wevtutil.exe cl Microsoft-Windows-WWAN-SVC-Events/Diagnostic
    wevtutil.exe cl Microsoft-Windows-WWAN-UI-Events/Diagnostic
    wevtutil.exe cl Microsoft-Windows-WebIO-NDF/Diagnostic
    wevtutil.exe cl Microsoft-Windows-WebIO/Diagnostic
    wevtutil.exe cl Microsoft-Windows-WebServices/Tracing
    wevtutil.exe cl Microsoft-Windows-Win32k/Concurrency
    wevtutil.exe cl Microsoft-Windows-Win32k/Power
    wevtutil.exe cl Microsoft-Windows-Win32k/Render
    wevtutil.exe cl Microsoft-Windows-Win32k/Tracing
    wevtutil.exe cl Microsoft-Windows-Win32k/UIPI
    wevtutil.exe cl Microsoft-Windows-WinHTTP-NDF/Diagnostic
    wevtutil.exe cl Microsoft-Windows-WinHttp/Diagnostic
    wevtutil.exe cl Microsoft-Windows-WinINet/Analytic
    wevtutil.exe cl Microsoft-Windows-WinRM/Analytic
    wevtutil.exe cl Microsoft-Windows-WinRM/Debug
    wevtutil.exe cl Microsoft-Windows-WinRM/Operational
    wevtutil.exe cl Microsoft-Windows-Windeploy/Analytic
    wevtutil.exe cl "Microsoft-Windows-Windows Defender/Operational"
    wevtutil.exe cl "Microsoft-Windows-Windows Defender/WHC"
    wevtutil.exe cl 'Microsoft-Windows-Windows Firewall With Advanced Security/ConnectionSecurity"
    wevtutil.exe cl "Microsoft-Windows-Windows Firewall With Advanced Security/ConnectionSecurityVerbose"
    wevtutil.exe cl 'Microsoft-Windows-Windows Firewall With Advanced Security/Firewall"
    wevtutil.exe cl 'Microsoft-Windows-Windows Firewall With Advanced Security/FirewallVerbose"
    wevtutil.exe cl Microsoft-Windows-WindowsBackup/ActionCenter
    wevtutil.exe cl Microsoft-Windows-WindowsColorSystem/Debug
    wevtutil.exe cl Microsoft-Windows-WindowsColorSystem/Operational
    wevtutil.exe cl Microsoft-Windows-WindowsSystemAssessmentTool/Operational
    wevtutil.exe cl Microsoft-Windows-WindowsSystemAssessmentTool/Tracing
    wevtutil.exe cl Microsoft-Windows-WindowsUpdateClient/Operational
    wevtutil.exe cl Microsoft-Windows-Wininit/Diagnostic
    wevtutil.exe cl Microsoft-Windows-Winlogon/Diagnostic
    wevtutil.exe cl Microsoft-Windows-Winlogon/Operational
    wevtutil.exe cl Microsoft-Windows-Winsock-AFD/Operational
    wevtutil.exe cl Microsoft-Windows-Winsock-WS2HELP/Operational
    wevtutil.exe cl Microsoft-Windows-Winsrv/Analytic
    wevtutil.exe cl Microsoft-Windows-Wired-AutoConfig/Diagnostic
    wevtutil.exe cl Microsoft-Windows-Wired-AutoConfig/Operational
    wevtutil.exe cl Microsoft-Windows-Wordpad/Admin
    wevtutil.exe cl Microsoft-Windows-Wordpad/Debug
    wevtutil.exe cl Microsoft-Windows-Wordpad/Diagnostic
    wevtutil.exe cl Microsoft-Windows-mobsync/Diagnostic
    wevtutil.exe cl Microsoft-Windows-ntshrui
    wevtutil.exe cl Microsoft-Windows-osk/Diagnostic
    wevtutil.exe cl Microsoft-Windows-stobject/Diagnostic
    wevtutil.exe cl ODiag
    wevtutil.exe cl OSession
    wevtutil.exe cl Security
    wevtutil.exe cl Setup
    wevtutil.exe cl System
    wevtutil.exe cl TabletPC_InputPanel_Channel
    wevtutil.exe cl WINDOWS_MP4SDECD_CHANNEL
    wevtutil.exe cl WMPSetup
    wevtutil.exe cl WMPSyncEngine
    wevtutil.exe cl "Windows PowerShell"





    Thursday, January 14, 2010 12:57 AM

All replies

  • Hi Ronnie

            Thank you for the listing!  BTW - I noticed that there were several lines that contained quotation marks ("  ") around folder names.  I have been unable to find anything in the wevtutil.exe cl documentation that explains how to use " " or why to use them,  can you help to explain why & when? 

            I also noticed that when I ran the batch file there were several errors, such as this one: 

    C:\Windows\System32>wevtutil.exe cl 'Microsoft-Windows-Windows Firewall With Advanced Security/FirewallVerbose" Too many arguments are specified. The parameter is incorrect. 

            While other folders simply could not be found, which based upon machine variances makes sense.

     

    Best regards,

    Doug

     

     

    Saturday, July 2, 2011 8:15 AM
  • Here's a simpler solution:

    -------Start copy---------

    @echo off
    FOR /F "tokens=1,2*" %%V IN ('bcdedit') DO SET adminTest=%%V
    IF (%adminTest%)==(Access) goto noAdmin
    for /F "tokens=*" %%G in ('wevtutil.exe el') DO (call :do_clear "%%G")
    echo.
    echo goto theEnd
    :do_clear
    echo clearing %1
    wevtutil.exe cl %1
    goto :eof
    :noAdmin
    exit

    ---------End copy----------

    Save as ClearEventLog.bat (or whatever name you want). Works well for me.


    SC Tom

    • Proposed as answer by pkn2011 Saturday, August 6, 2011 6:33 AM
    Saturday, July 23, 2011 3:55 PM
  • Hi dshuck, you said..

     how to use " " or why to use them, can you help to explain why & when?

     

    The quotation marks enclose the string to send it as one parameter to the command, in the cases where there are spaces in the path. The reason some of those lines would fail (apart from folder not found) was just a simple typo. as in simply replace the single ' with a quotation mark " to fix them.

    But do we really need a script to do it? what happens if you just go into the folder "c:\Windows\System32\winevt\Logs" and just delete *.*  Would a default file be created next time Winevt tried to lock onto an existing log that didn't exist or would it just fall over?

    Hmm, I might go create a restore point and try finding out! ;-)

     

    feeling a bit nefarious, pkn2011


    If my post was helpful - give it a Vote. If it helps solve your problem - propose it as Answer. ;-)
    Sunday, July 24, 2011 12:19 PM
  • Hi, 

    Whether it is a dummy, in which directory I've saved the file "ClearEventLog."?


    WodzuAS

    Tuesday, September 17, 2013 1:07 PM
  • thanks Tom a very good way to clear the events logs
    • Proposed as answer by JJ' Friday, December 4, 2015 12:22 PM
    Friday, December 4, 2015 12:22 PM
  • I used to use this method but it required me to manually add new event logs.

    This method is much simpler as it will wildcard for the names of all your event logs then clear them.

    Save this as a PowerShell script and run it as admin

    wevtutil el | Foreach-Object {wevtutil cl “$_”}

    Wednesday, February 20, 2019 3:23 PM