Get the event log entries for the last 24 hours

Поделиться
HTML-код
  • Опубликовано: 30 сен 2024
  • This is going to be short. I'm not sure about sweet. The goal is to get the log entries for the last twenty-four hours. As in previous videos this starts by creating a variable that we can place the data and access it either by doing an echo or by exporting it to either a text of a csv file. This should be very handy when doing incident response.
    $events = Get-EventLog -LogName System -After (Get-Date).AddDays(-1) | Sort-Object -Property EventTime
    Output:
    echo $events

Комментарии •