Loading...

Powershell Tip : Show last events logs to HTML

Reply A+ A-

In this post I'll show you a easy way to export and list  event logs to HTLM.




Which events to export ?

In my case I choose to list the last 5 system and application errors :

  • $All_System_Error = get-eventlog System | where {$_.EntryType -eq "Error"} | select timegenerated, source, eventid, message
  • $All_Apps_Error = get-eventlog Application | where {$_.EntryType -eq "Error"} | select timegenerated, source, eventid, message



How it looks ?

List of last 5 system and application errors




How to use it ?

1 ) Copy the "systanddeploy.css" file in %temp%

2 ) Choose what you want to list as below :
Example to list last 5 system erros







  • All_System_Error  : To list System error
  • All_Apps_Error : To list Applications error


How to get the script ?
Windows 2909416943093083736

Enregistrer un commentaire

Accueil item

Award

Learn KQL in one month

Sponsors

You want to support me ?

Mes articles en français

Books in French


Stats