Quantcast
Channel: Hey, Scripting Guy! Blog
Viewing all articles
Browse latest Browse all 3333

PowerTip: Find the Number of Entries in Event Logs

$
0
0

PowerTip: Find the Number of Entries in Event Logs

Summary: Use Windows PowerShell to find the number of entries in all event logs and ETL logs?

 Hey, Scripting Guy! Question How can you use Windows PowerShell to show how many entries exist in all traditional event logs as well as ETL logs?

Hey, Scripting Guy! Answer Use the Get-WinEvent cmdlet and pass a wild card to the –ListLog parameter. Sort the recordcount in a descending manner, and select both the recordcount and logname. To tighten up the output, pipe the results to the Format-Table cmdlet and use –autosize.

Get-WinEvent -ListLog * -ea 0 | sort recordcount -Descending |

select recordcount, logname | Format-Table -auto


Viewing all articles
Browse latest Browse all 3333

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>