How To Scrubbing PC Logs Via CMD | Command Prompt

I’m going write how to Scrubbing PC logs via CMD (Command Prompt)

Simple commands using CMD to remove your system logs that everyone might not know.

Delete previous DNS server

ipconfig /flushdns

Purges the contents of the NetBIOS name cache

nbtstat -R

Clear File explorer history and dialog box history

Del /F /Q %APPDATA%\Microsoft\Windows\Recent*
Del /F /Q %APPDATA%\Microsoft\Windows\Recent\AutomaticDestinations*
Del /F /Q %APPDATA%\Microsoft\Windows\Recent\CustomDestinations*
REG Delete HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\RunMRU /VA /F
REG Delete HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\TypedPaths /VA /F

CBS.log file records entries when a static file changes.

del “C:\Windows\Logs\CBS\CbsPersist*.cab” /s /f /q
del “C:\Windows\Logs\CBS\CbsPersist*.log” /s /f /q
del “C:\Windows\Logs\CBS\Cbs*.log” /s /f /q

Clear Windows Events logs

for /F “tokens=*” %1 in (‘wevtutil.exe el’) DO wevtutil.exe cl “%1”
pause>null

Enjoy!

3 Likes