Getting all log names on PC in PowerShell

Поделиться
HTML-код
  • Опубликовано: 30 сен 2024
  • A part of my day revolves around the task of getting answers to help determine what the problem is. One of the best ways to get an answer is to look at the logs. Sounds simple until you ask which log do I look at? Do I know all the logs? How many different logs are there on this PC? All valid questions. Today we are going to look at an option to help us answer those questions.
    Get-WinEvent -ListLog * | Select-Object LogName
    Variant will output to a text file:
    Get-WinEvent -ListLog * | Select-Object LogName | Out-File -FilePath "C:\LogNames.txt"
  • НаукаНаука

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