Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## Get all event logs available and show stats for them such as newest and oldest events, record count and maximum file size
- Get-WinEvent -ListLog *|ForEach-Object { $oldest = Get-WinEvent -LogName $_.LogName -Oldest -MaxEvents 1 -ErrorAction SilentlyContinue ; $_ | Select LogName,RecordCount,@{n='Oldest';e={$oldest|Select -expand TimeCreated}},LastWriteTime,@{n='Max Size(MB)';e={($_.MaximumSizeInBytes)/1MB -as [int]}},IsLogFull,IsEnabled,LogMode} |ogv
- ## add LogFilePath to Select statement if on Citrix and you want to see which logs are written to a persistent drive
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement