![]() ![]()
I invite you to follow me on Twitter and Facebook. We have a guest article by Windows PowerShell MVP Sean Kearney. Well, this concludes Troubleshooting Windows Week. I have reduced space utilization from 68 MB to 9 MB-woohoo! The commands and associated output are shown in the following figure. After I have run the command to clear all the logs, I go back and run the command to obtain the current log size. That is not a problem however, and is actually expected when clearing 492 logs. The error states that it is unable to clear the DebugChannel log. The semicolon character begins a new command, and I use the 1 MB administrative constant to convert the bytes stored in the $size variable into megabytes. The += operator means to take the value stored in the $size variable, and add the amount in the filesize property of each log as it streams over the pipeline. The % sign is an alias for the ForEach-Object cmdlet. In case you want to know, the following command is what I ran to get the amount of space consumed by the logs. On the other hand, if you ever need to do troubleshooting or security analysis, the logs are your primary source of information. The disk space savings are therefore miniscule. #Cbs persist log windows 2011 installOn my heavily managed corporate laptop with a two-year-old install of Windows 7 Enterprise, the amount of disk space consumed is 221 MB. On my Windows 7 ultimate workstation that is a relatively fresh install and maintains all of the defaults in regard to logging, my log and trace files consume on 68 MB of disk space. Some of the things I read seem to indicate there are massive disk space gains to be achieved by emptying all the logs. One thing I feel I should do before showing you the one-line command to clear all event logs and trace logs on your system is to say I do not think it is a great idea. Yesterday, I talked about automating the enabling and disabling of trace logs to assist in troubleshooting specific problems. #Cbs persist log windows 2011 softwareOn Wednesday, I talked about using Windows PowerShell to troubleshoot software installation. On Tuesday, I explored parsing the message property of the WMI Activity Trace log. On Monday, I continued the ETW discussion by examining the datetime stamp that is generated for each event. #Cbs persist log windows 2011 how toI discussed how to enable and disable the logs, and how to use the Get-WinEvent cmdlet to find and to read the trace. ![]() In Saturday’s Weekend Scripter post, I talked about working with Event Tracing for Windows (ETW) logs. Before I get too carried away, you might want to review some of the other articles in this series about using Windows PowerShell to work with the Windows trace logs. ![]() One of the things I found as I was researching ways to enable and to disable the ETW trace logs is that a seemingly large number of people wanted a way to clear out all the logs. Summary: Learn how to use Windows PowerShell to check disk space used by logs, and to clear those logs to reclaim space. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |